/* ==========================================================================
   my 2nd brain — my2ndbrain.in
   Graphite ground, amber accent (the colour of a notification light).
   Instrument Serif display over Instrument Sans.
   ========================================================================== */

:root {
  /* Fixed dark tokens. Used by always-dark bands in BOTH themes, so they are
     deliberately not theme-dependent — those bands are a design element, the
     way a photograph is, not a surface that follows the reader. */
  --ink:        #0E1013;
  --ink-2:      #16191F;
  --ink-3:      #1F232B;
  --on-ink:     #ECEEF2;
  --on-ink-mute: rgba(236, 238, 242, .62);
  --rule-ink:   rgba(255, 255, 255, .10);

  /* Light palette — complete, so the un-stamped default resolves. */
  --paper:      #F3F4F7;
  --surface:    #FFFFFF;
  --surface-2:  #EAECF1;
  --text:       #12141A;
  --text-mute:  #565D6E;
  --text-faint: #858B9B;
  --rule:       #E0E3EA;

  --accent:      #E08A2B;
  --accent-hi:   #F5A93F;
  --accent-ink:  #171003;
  --accent-wash: #FDF2E2;
  --glow:        rgba(245, 169, 63, .30);

  --measure: 64ch;
  --r-sm: 10px;
  --r: 16px;
  --r-pill: 999px;

  --step--1: clamp(.82rem, .8rem + .12vw, .89rem);
  --step-0:  clamp(1rem, .97rem + .18vw, 1.09rem);
  --step-1:  clamp(1.24rem, 1.15rem + .4vw, 1.5rem);
  --step-2:  clamp(1.65rem, 1.4rem + 1vw, 2.3rem);
  --step-3:  clamp(2.3rem, 1.75rem + 2.4vw, 4rem);

  --f-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0E1013;
    --surface:    #16191F;
    --surface-2:  #1F232B;
    --text:       #ECEEF2;
    --text-mute:  #A6ACBB;
    --text-faint: #767D8E;
    --rule:       #262B34;
    --accent:      #F5A93F;
    --accent-hi:   #FFC06A;
    --accent-wash: #2A1E0B;
  }
}

:root[data-theme="dark"] {
  --paper:      #0E1013;
  --surface:    #16191F;
  --surface-2:  #1F232B;
  --text:       #ECEEF2;
  --text-mute:  #A6ACBB;
  --text-faint: #767D8E;
  --rule:       #262B34;
  --accent:      #F5A93F;
  --accent-hi:   #FFC06A;
  --accent-wash: #2A1E0B;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--f-display); font-weight: 400; line-height: 1.04; letter-spacing: -.015em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-family: var(--f-sans); font-weight: 600; font-size: var(--step-1); letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
em { font-style: italic; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 1.05rem; }
.stack { display: flex; flex-direction: column; }
.stack-lg { gap: 2.2rem; } .stack-md { gap: 1.25rem; } .stack-sm { gap: .55rem; }

.eyebrow {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}

/* ---- always-dark band --------------------------------------------------- */
.ink-band { background: var(--ink); color: var(--on-ink); }
.ink-band h1, .ink-band h2, .ink-band h3 { color: var(--on-ink); }
.ink-band p { color: var(--on-ink-mute); }
.ink-band .eyebrow { color: var(--accent-hi); }
.ink-band .lead { color: var(--on-ink); }

/* ---- header ------------------------------------------------------------- */
.site-head { background: var(--ink); color: var(--on-ink); border-bottom: 1px solid var(--rule-ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--on-ink); }
.mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-hi); color: var(--accent-ink);
  font-family: var(--f-display); font-size: 1.05rem; line-height: 1;
}
.brand-name { font-weight: 600; letter-spacing: -.02em; font-size: 1.02rem; }
.brand-name em { font-family: var(--f-display); font-style: italic; font-weight: 400; }
.nav { display: flex; gap: 1.4rem; font-size: .92rem; flex-wrap: wrap; }
.nav a { color: var(--on-ink-mute); text-decoration: none; }
.nav a:hover { color: var(--accent-hi); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; padding: .72rem 1.4rem;
  border-radius: var(--r-pill); text-decoration: none;
  background: var(--accent-hi); color: var(--accent-ink);
  border: 1px solid var(--accent-hi); box-shadow: 0 0 34px var(--glow);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-quiet {
  background: transparent; color: var(--on-ink); box-shadow: none;
  border-color: var(--rule-ink);
}
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---- hero --------------------------------------------------------------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2.2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
h1 .alt { font-style: italic; color: var(--accent-hi); display: block; }
.lead { font-size: var(--step-1); line-height: 1.45; }

/* ---- chat mock ---------------------------------------------------------- */
.chat {
  background: var(--ink-2); border: 1px solid var(--rule-ink); border-radius: 20px;
  padding: 1.1rem; display: flex; flex-direction: column; gap: .5rem;
}
.chat-head { display: flex; align-items: center; gap: .6rem; padding-bottom: .8rem; border-bottom: 1px solid var(--rule-ink); font-size: .86rem; }
.chat-head strong { color: var(--on-ink); }
/* :not(.mark) — a bare `.chat-head span` outranks `.mark` and blanks the avatar. */
.chat-head span:not(.mark) { color: var(--on-ink-mute); font-size: .78rem; }
.msg {
  font-size: .89rem; line-height: 1.45; padding: .55rem .82rem;
  border-radius: 13px; max-width: 86%; white-space: pre-line;
}
.msg-in  { background: var(--ink-3); color: var(--on-ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-out { background: var(--accent-hi); color: var(--accent-ink); align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.msg-time { font-size: .72rem; color: var(--on-ink-mute); align-self: center; padding: .2rem 0; }
.chips { display: flex; gap: .35rem; align-self: flex-start; }
.chip {
  font-size: .78rem; font-weight: 600; color: var(--accent-hi);
  border: 1px solid var(--rule-ink); background: var(--ink-3);
  border-radius: 9px; padding: .34rem .7rem;
}

@media (prefers-reduced-motion: no-preference) {
  .chat > * { animation: rise .45s ease-out backwards; }
  .chat > *:nth-child(2) { animation-delay: .06s; }
  .chat > *:nth-child(3) { animation-delay: .2s; }
  .chat > *:nth-child(4) { animation-delay: .34s; }
  .chat > *:nth-child(5) { animation-delay: .48s; }
  .chat > *:nth-child(6) { animation-delay: .62s; }
  .chat > *:nth-child(7) { animation-delay: .76s; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---- sections ----------------------------------------------------------- */
section { padding: clamp(2.6rem, 5.5vw, 4.5rem) 0; }
.band { background: var(--surface); border-block: 1px solid var(--rule); }

.grid-3 { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 50rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.step { display: flex; flex-direction: column; gap: .5rem; }
.step-label { font-size: .74rem; font-weight: 600; letter-spacing: .14em; color: var(--accent); display: flex; align-items: center; gap: .6rem; }
.step-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.ink-band .step-label::after { background: var(--rule-ink); }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .55rem;
}
.band .card { background: var(--paper); }

/* Four independent controls, not a sequence -- so a rule, not a numeral.
   Numbering these would assert an order the content does not have. */
.controls { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.controls > li { border-left: 2px solid var(--accent); padding-left: 1.1rem; }

/* ---- pricing ------------------------------------------------------------ */
.tiers { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.7rem; display: flex; flex-direction: column; gap: .85rem; }
.band .tier { background: var(--paper); }
.tier-hi { border-color: var(--accent); }
.price { font-family: var(--f-display); font-size: var(--step-2); font-variant-numeric: tabular-nums; line-height: 1; }
.price small { font-family: var(--f-sans); font-size: .8rem; color: var(--text-faint); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; font-size: .93rem; }
.ticks li { display: flex; gap: .6rem; }
.ticks li::before { content: "→"; color: var(--accent); }

/* ---- documents ---------------------------------------------------------- */
.doc { padding: clamp(2.2rem, 5vw, 3.5rem) 0 4.5rem; }
.doc h2 { font-family: var(--f-sans); font-weight: 600; font-size: var(--step-1); margin-top: 1.8rem; letter-spacing: -.01em; }
.doc h3 { font-size: var(--step-0); margin-top: 1.1rem; }
.doc ul, .doc ol { padding-left: 1.15rem; display: flex; flex-direction: column; gap: .4rem; margin: 0; }
.doc dl { margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.doc dt { font-weight: 600; font-size: .93rem; }
.doc dd { margin: .15rem 0 0; color: var(--text-mute); }
.updated { font-size: .86rem; color: var(--text-faint); }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); }
th, td { text-align: left; padding: .72rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* ---- placeholder marker ------------------------------------------------- */
.fill {
  background: var(--accent-wash); color: var(--accent); font-size: .87em; font-weight: 600;
  padding: .1em .45em; border-radius: 5px; border: 1px dashed var(--accent);
}
.ink-band .fill { background: rgba(245,169,63,.12); color: var(--accent-hi); }

/* ---- footer ------------------------------------------------------------- */
.site-foot { background: var(--ink); color: var(--on-ink-mute); padding: 3rem 0 2rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; font-size: .9rem; }
@media (min-width: 50rem) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-grid h4 { font-size: .73rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-mute); margin: 0 0 .7rem; font-weight: 600; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.foot-links a { color: var(--on-ink-mute); text-decoration: none; }
.foot-links a:hover { color: var(--accent-hi); }
.colophon { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid var(--rule-ink); font-size: .82rem; color: var(--on-ink-mute); }
