/* EtReply — Design tokens (Claude-inspired warm parchment system) */
:root {
  /* Brand */
  --et-terracotta: #c96442;
  --et-coral: #d97757;

  /* Surfaces */
  --et-parchment: #f5f4ed;
  --et-ivory: #faf9f5;
  --et-white: #ffffff;
  --et-sand: #e8e6dc;
  --et-dark-surface: #30302e;
  --et-deep-dark: #141413;

  /* Neutrals */
  --et-near-black: #141413;
  --et-charcoal: #4d4c48;
  --et-olive: #5e5d59;
  --et-stone: #87867f;
  --et-dark-warm: #3d3d3a;
  --et-silver: #b0aea5;

  /* Borders */
  --et-border-cream: #f0eee6;
  --et-border-warm: #e8e6dc;
  --et-border-dark: #30302e;
  --et-ring-warm: #d1cfc5;
  --et-ring-deep: #c2c0b6;

  /* Semantic */
  --et-error: #b53333;
  --et-focus: #3898ec;
  --et-success: #6b7a4f;

  /* Shadows */
  --et-shadow-whisper: 0 4px 24px rgba(0,0,0,0.05);
  --et-ring: 0 0 0 1px var(--et-ring-warm);
  --et-ring-deep-shadow: 0 0 0 1px var(--et-ring-deep);

  /* Type */
  --et-serif: "Source Serif 4", "Source Serif Pro", "Tiempos", Georgia, "Iowan Old Style", serif;
  --et-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --et-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radii */
  --et-r-sm: 6px;
  --et-r: 8px;
  --et-r-md: 12px;
  --et-r-lg: 16px;
  --et-r-xl: 24px;
  --et-r-2xl: 32px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--et-sans); color: var(--et-near-black); background: var(--et-parchment); -webkit-font-smoothing: antialiased; }

/* Type utilities */
.et-serif { font-family: var(--et-serif); font-weight: 500; letter-spacing: -0.01em; }
.et-mono { font-family: var(--et-mono); }

/* Headings */
.et-h-display { font-family: var(--et-serif); font-weight: 500; font-size: 64px; line-height: 1.05; letter-spacing: -0.02em; }
.et-h-1 { font-family: var(--et-serif); font-weight: 500; font-size: 52px; line-height: 1.08; letter-spacing: -0.015em; }
.et-h-2 { font-family: var(--et-serif); font-weight: 500; font-size: 36px; line-height: 1.15; letter-spacing: -0.01em; }
.et-h-3 { font-family: var(--et-serif); font-weight: 500; font-size: 28px; line-height: 1.2; letter-spacing: -0.005em; }
.et-h-4 { font-family: var(--et-serif); font-weight: 500; font-size: 22px; line-height: 1.25; }
.et-h-5 { font-family: var(--et-serif); font-weight: 500; font-size: 18px; line-height: 1.3; }

/* Body */
.et-lead { font-size: 20px; line-height: 1.55; color: var(--et-olive); }
.et-body { font-size: 16px; line-height: 1.55; color: var(--et-charcoal); }
.et-body-serif { font-family: var(--et-serif); font-size: 17px; line-height: 1.6; color: var(--et-charcoal); font-weight: 400; }
.et-caption { font-size: 14px; line-height: 1.45; color: var(--et-olive); }
.et-overline { font-size: 11px; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; color: var(--et-stone); font-weight: 500; }

/* Buttons */
.et-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--et-sans); font-size: 15px; font-weight: 500; line-height: 1; border: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.et-btn:active { transform: translateY(0.5px); }

.et-btn-primary { background: var(--et-terracotta); color: var(--et-ivory); padding: 10px 18px; border-radius: var(--et-r-md); box-shadow: 0 0 0 1px var(--et-terracotta); }
.et-btn-primary:hover { background: #bb5a3a; }

.et-btn-dark { background: var(--et-near-black); color: var(--et-silver); padding: 10px 18px; border-radius: var(--et-r-md); border: 1px solid var(--et-dark-surface); }
.et-btn-dark:hover { background: var(--et-dark-surface); color: var(--et-ivory); }

.et-btn-secondary { background: var(--et-sand); color: var(--et-charcoal); padding: 9px 14px; border-radius: var(--et-r); box-shadow: 0 0 0 1px var(--et-ring-warm); }
.et-btn-secondary:hover { background: #dedcd2; }

.et-btn-white { background: var(--et-white); color: var(--et-near-black); padding: 9px 16px; border-radius: var(--et-r-md); box-shadow: 0 0 0 1px var(--et-border-warm); }
.et-btn-white:hover { background: var(--et-ivory); }

.et-btn-ghost { background: transparent; color: var(--et-near-black); padding: 9px 14px; border-radius: var(--et-r); }
.et-btn-ghost:hover { background: rgba(20,20,19,0.04); }

.et-btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--et-r-sm); }
.et-btn-lg { padding: 14px 22px; font-size: 16px; border-radius: var(--et-r-md); }

/* Inputs */
.et-label { display: block; font-size: 13px; color: var(--et-charcoal); margin-bottom: 6px; font-weight: 500; }
.et-input { width: 100%; font-family: var(--et-sans); font-size: 15px; color: var(--et-near-black); background: var(--et-ivory); border: 1px solid var(--et-border-warm); border-radius: var(--et-r-md); padding: 10px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.et-input::placeholder { color: var(--et-stone); }
.et-input:hover { border-color: var(--et-ring-warm); }
.et-input:focus { border-color: var(--et-focus); box-shadow: 0 0 0 3px rgba(56,152,236,0.15); }
.et-input-error { border-color: var(--et-error); }

.et-textarea { min-height: 120px; resize: vertical; line-height: 1.5; font-family: var(--et-sans); }

.et-help { margin-top: 6px; font-size: 12px; color: var(--et-stone); }
.et-help-error { color: var(--et-error); }

/* Cards */
.et-card { background: var(--et-ivory); border: 1px solid var(--et-border-cream); border-radius: var(--et-r-lg); }
.et-card-white { background: var(--et-white); border: 1px solid var(--et-border-warm); border-radius: var(--et-r-lg); }
.et-card-elevated { background: var(--et-ivory); border-radius: var(--et-r-lg); box-shadow: var(--et-shadow-whisper), 0 0 0 1px var(--et-border-cream); }

/* Badges */
.et-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em; }
.et-badge-sand { background: var(--et-sand); color: var(--et-charcoal); }
.et-badge-brand { background: rgba(201,100,66,0.1); color: var(--et-terracotta); }
.et-badge-dark { background: var(--et-near-black); color: var(--et-silver); }
.et-badge-success { background: rgba(107,122,79,0.12); color: var(--et-success); }
.et-badge-error { background: rgba(181,51,51,0.08); color: var(--et-error); }
.et-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Divider */
.et-divider { height: 1px; background: var(--et-border-cream); border: none; margin: 0; }
.et-divider-warm { height: 1px; background: var(--et-border-warm); border: none; margin: 0; }

/* Placeholder imagery */
.et-placeholder { background:
  repeating-linear-gradient(135deg, rgba(20,20,19,0.035) 0 8px, transparent 8px 16px),
  var(--et-sand);
  border: 1px solid var(--et-border-warm);
  display: flex; align-items: center; justify-content: center;
  color: var(--et-olive); font-family: var(--et-mono); font-size: 12px;
  border-radius: var(--et-r-lg);
}

/* Focus ring for keyboard */
.et-focus-ring:focus-visible { outline: 2px solid var(--et-focus); outline-offset: 2px; }

/* Decorative parchment texture (very subtle) */
.et-parchment-bg { background-color: var(--et-parchment); background-image: radial-gradient(circle at 25% 30%, rgba(201,100,66,0.025), transparent 50%), radial-gradient(circle at 80% 70%, rgba(94,93,89,0.03), transparent 50%); }
