/* Pronounced — Tool Page Styles
   Brand: deep midnight + champagne gold, paper cream BG, eucalyptus green accents
   Vibe: editorial wedding + craft gamification */

:root {
  --ink: #1F2A44;
  --ink-deep: #14182A;
  --gold: #C99A4D;
  --gold-soft: #E8B86D;
  --cream: #FAF8F4;
  --cream-warm: #F2EBDE;
  --paper: #FFFFFF;
  --euca: #4A7C59;
  --euca-soft: #8FB59B;
  --charcoal: #2C2A26;
  --muted: #6B6760;
  --line: #E5DFD2;
  --shadow: 0 1px 2px rgba(31,42,68,0.06), 0 8px 24px rgba(31,42,68,0.08);

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold); }

/* HEADER */
.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}
.brand-name { font-style: italic; }
.brand-name::after {
  content: ".";
  color: var(--gold);
  margin-left: 1px;
}
.tool-nav { display: flex; gap: 28px; }
.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active { border-bottom: 2px solid var(--gold); padding-bottom: 4px; }

/* MAIN */
.tool-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.tool-hero { text-align: center; margin-bottom: 40px; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--cream-warm);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.tool-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.subhead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 24px;
}

.badges-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.xp-badge, .streak-badge, .score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.xp-icon { color: var(--gold); }
.streak-icon { color: var(--euca); }
.score-icon { color: var(--ink); }

/* GRID */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

/* FORM */
.ceremony-form { display: flex; flex-direction: column; gap: 18px; }
.form-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232,184,109,0.18);
}
.field textarea { resize: vertical; min-height: 80px; }

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

/* CTA BUTTON */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 15px 28px;
  font: 600 1rem var(--sans);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 2px 0 var(--ink-deep);
}
.cta-button:hover {
  background: var(--ink-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink-deep);
}
.cta-button:active { transform: translateY(1px); box-shadow: none; }
.btn-xp {
  display: inline-flex;
  align-items: center;
  background: var(--gold);
  color: var(--ink-deep);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cta-button-small {
  display: inline-block;
  background: var(--gold);
  color: var(--ink-deep);
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 10px;
}
.cta-button-small:hover { background: var(--gold-soft); color: var(--ink-deep); }

.form-disclaimer {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

/* RESULT PANE */
.result-pane { min-height: 480px; position: relative; }
.hidden { display: none !important; }

.result-empty { text-align: center; padding: 20px 0; }
.placeholder-art {
  height: 80px;
  position: relative;
  margin: 12px auto 20px;
  width: 120px;
}
.placeholder-ring {
  width: 60px;
  height: 60px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  position: absolute;
  top: 10px;
  left: 0;
}
.placeholder-ring-2 {
  left: 50px;
  border-color: var(--ink);
}
.placeholder-text {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.placeholder-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.streak-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: left;
}
.streak-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.streak-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.streak-list li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  font-size: 0.92rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.streak-list li:last-child { border-bottom: none; }
.streak-list .rank {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.streak-list .score {
  font-weight: 700;
  color: var(--euca);
}
.streak-list .you {
  background: var(--cream-warm);
  margin: 0 -10px;
  padding: 8px 10px;
  border-radius: 6px;
}
.streak-list .you .score { color: var(--muted); }

/* LOADING */
.result-loading { text-align: center; padding: 60px 20px; }
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--cream-warm);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 22px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-loading p {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.loading-sub { font-family: var(--sans) !important; font-size: 0.9rem !important; color: var(--muted) !important; }

/* RESULT CONTENT */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.result-header h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0;
  font-weight: 600;
}
.result-actions { display: flex; gap: 8px; }
.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 7px;
  font: 500 0.82rem var(--sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ghost-btn:hover { background: var(--cream); border-color: var(--gold); }

.xp-earned-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--cream-warm), var(--cream));
  border: 1px solid var(--gold-soft);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.xp-large {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
  font-style: italic;
}
.xp-label {
  font-size: 0.88rem;
  color: var(--ink);
}

.script-output {
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  padding: 24px;
  border-radius: 10px;
  border-left: 4px solid var(--gold);
  max-height: 540px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.script-output h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  margin: 18px 0 4px;
}
.script-output h3:first-child { margin-top: 0; }
.script-output p { margin: 0 0 10px; }
.script-output em { color: var(--euca); }

.result-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.result-error {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink);
}

/* FOOTER CTA */
.tool-footer-cta {
  margin-top: 80px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
}
.tool-footer-cta h3 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 32px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}
.feature { text-align: left; padding: 0 4px; }
.feature-icon {
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.feature h4 {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
  margin: 0 0 6px;
  font-weight: 600;
}
.feature p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* FOOTNOTE */
.tool-footnote {
  text-align: center;
  padding: 36px 16px 24px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.tool-footnote a { color: var(--ink); font-weight: 500; }
.tool-footnote a:hover { color: var(--gold); }

/* PRINT */
@media print {
  .tool-header, .tool-nav, .tool-footer-cta, .tool-footnote,
  .ceremony-form, .result-actions, .result-footer, .xp-earned-banner,
  .tool-hero, .badges-row { display: none !important; }
  .tool-grid { grid-template-columns: 1fr; }
  .card { box-shadow: none; border: none; }
  .script-output {
    border: none; max-height: none; overflow: visible;
    background: transparent; padding: 0; font-size: 1.15rem; line-height: 1.85;
  }
}
