/* ==========================================================================
   DNA of a Leader — standalone product theme
   Dark, grounded, gold-accented. Fresh-tech premium with a sacred undertone.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0a0a0e;
  --bg-deep: #07070a;
  --surface: #1a1a24;
  --surface-2: #22222e;
  --surface-3: #2a2a36;
  --line: rgba(233, 226, 209, 0.10);
  --line-strong: rgba(233, 226, 209, 0.18);
  --ink: #f2ecdd;
  --muted: #93a89b;
  --muted-2: #6f8478;
  --gold: #c8a96e;
  --gold-soft: #dcc18a;
  --gold-deep: #a98a4f;
  --sage: #6f8f76;
  --green: #6fae84;
  --clay: #cf8a63;
  --rose: #d98c84;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px rgba(200, 169, 110, 0.35), 0 10px 40px rgba(200, 169, 110, 0.10);
  --sans: "Inter", ui-sans-serif, -apple-system, system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #1a1a24 0%, var(--bg) 55%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.2px; margin: 0; }

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

/* ---- Brand mark ---- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: none; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: 0.05em; line-height: 1.02; color: var(--c-cream-bright); }
.brand-name small { display: block; font-family: var(--sans); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: var(--c-copper-ink); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-soft); }
.btn-block { width: 100%; }

.link-btn { background: none; border: 0; color: var(--gold-soft); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--gold); }

/* ---- Inputs ---- */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field input {
  width: 100%; min-height: 46px; padding: 0 14px;
  background: var(--bg-deep); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--sans); font-size: 0.98rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus { outline: none; border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.16); }

.form-error {
  min-height: 20px; margin: 2px 0 12px;
  color: var(--rose); font-size: 0.85rem;
}

/* ---- Auth screen ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card {
  width: min(420px, 100%);
  padding: clamp(26px, 5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .brand { justify-content: center; margin-bottom: 18px; }
.auth-head h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-head p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.auth-toggle { margin-top: 18px; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ---- App shell / topbar ---- */
.app-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(18px, 5vw, 48px);
  background: rgba(10, 10, 14, 0.78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-top nav { display: flex; gap: 6px; }
.app-top nav a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--muted); font-size: 0.88rem; font-weight: 600;
}
.app-top nav a:hover { color: var(--ink); background: var(--surface-2); }
.app-top nav a.active { color: var(--gold); background: var(--surface-2); }
.top-user { display: flex; align-items: center; gap: 12px; }
.avatar-chip {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--gold-deep);
  color: var(--gold-soft); font-weight: 800; font-size: 0.85rem;
}

.page { max-width: 1080px; margin: 0 auto; padding: clamp(24px, 5vw, 48px) clamp(18px, 5vw, 48px) 80px; }

/* ---- Hero / greeting ---- */
.hero { margin-bottom: 30px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 8px 0 10px; }
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 60ch; line-height: 1.5; }

/* ---- Journey progress ---- */
.journey {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 0 0 34px; padding: 18px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface);
}
.journey-step { display: flex; gap: 12px; align-items: flex-start; }
.journey-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.9rem;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--line-strong);
}
.journey-step.done .journey-num { background: var(--gold); color: var(--c-copper-ink); border-color: var(--gold); }
.journey-step.current .journey-num { color: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,0.15); }
.journey-step h4 { margin: 4px 0 2px; font-family: var(--sans); font-size: 0.95rem; font-weight: 700; }
.journey-step span { font-size: 0.8rem; color: var(--muted-2); }

.next-action {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  margin: 22px 0 34px; padding: clamp(22px, 4vw, 32px);
  border: 1px solid rgba(200,169,110,0.35); border-radius: 18px;
  background: linear-gradient(135deg, rgba(200,169,110,0.13), rgba(200,169,110,0.035));
  box-shadow: var(--shadow-sm);
}
.next-action .eyebrow { margin: 0 0 8px; color: var(--gold-soft); }
.next-action h2 { margin: 0 0 8px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.next-action-copy > p:last-child { margin: 0; max-width: 62ch; color: var(--muted); line-height: 1.6; }
.next-action-buttons { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 210px; text-align: center; }
.next-action-buttons .btn { text-decoration: none; }
.next-action-coach { color: var(--gold-soft); font-size: .9rem; font-weight: 700; text-decoration: none; padding: 6px; }
.next-action-coach:hover { text-decoration: underline; }

/* ---- Tool tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 188px;
}
.tile.unlocked:hover { transform: translateY(-3px); border-color: var(--gold-deep); box-shadow: var(--shadow-md); }
.tile.locked { opacity: 0.62; }
.tile-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--gold); border: 1px solid var(--line-strong); font-size: 1.2rem;
}
.tile h3 { font-size: 1.3rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; flex: 1; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.tile-cta { color: var(--gold-soft); font-weight: 700; font-size: 0.9rem; }
.tile.locked .tile-cta { color: var(--muted-2); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge-start { background: rgba(200,169,110,0.16); color: var(--gold-soft); }
.badge-done { background: rgba(111,174,132,0.16); color: var(--green); }
.badge-next { background: rgba(200,169,110,0.16); color: var(--gold-soft); }
.badge-soon { background: var(--surface-3); color: var(--muted); }
.badge-lock { background: var(--surface-3); color: var(--muted-2); }

.section-label { margin: 36px 0 14px; }

/* Keep the journey's recommended action dominant; the toolkit is available
   on demand instead of competing as six equal calls to action. */
.tool-library { margin-top: 26px; border-top: 1px solid var(--line); }
.tool-library > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 76px; cursor: pointer; color: var(--ink);
}
.tool-library > summary::-webkit-details-marker { display: none; }
.tool-library > summary > span:first-child { display: grid; gap: 5px; }
.tool-library > summary strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.tool-library-toggle { color: var(--gold-soft); font-size: .86rem; font-weight: 700; }
.tool-library-toggle::after { content: " +"; }
.tool-library[open] .tool-library-toggle::after { content: " −"; }
.tool-library[open] > summary { margin-bottom: 10px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 720px) {
  .journey { grid-template-columns: 1fr; }
  .next-action { grid-template-columns: 1fr; gap: 20px; }
  .next-action-buttons { min-width: 0; }
  .app-top nav { overflow-x: auto; flex-wrap: nowrap; max-width: 60vw; scrollbar-width: none; }
  .app-top nav::-webkit-scrollbar { display: none; }
  .page { padding-top: 24px; padding-bottom: 52px; }
  .hero { margin-bottom: 20px; }
  .hero h1 { font-size: 1.85rem; }
  .journey { display: flex; padding: 12px; margin-bottom: 18px; overflow: hidden; }
  .journey-step { display: none; }
  .journey-step.current { display: flex; width: 100%; }
  .journey-step.current::after { content: "Current step"; margin-left: auto; align-self: center; color: var(--gold); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
  .next-action { display: block; margin: 0; padding: 24px 20px; }
  .next-action-copy > p:last-child { display: none; }
  .next-action-buttons { margin-top: 20px; }
  .next-action-coach { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .tool-library { margin-top: 20px; }
  .tool-library > summary { min-height: 68px; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { padding: 16px; min-height: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); column-gap: 12px; }
  .tile > .eyebrow { grid-column: 2; }
  .tile-icon { grid-row: 1 / span 3; width: 38px; height: 38px; }
  .tile h3, .tile p, .tile-foot { grid-column: 2; }
  .tile p { display: none; }
}
