/* Courteous — "The Grand Salon". Hand-written; no framework.
   Light = day salon (ivory, emerald ink, champagne gold). Dark = night salon (midnight emerald).
   Header, page "stage" bands and tool panels are velvet-dark in both themes. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/playfair.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap; src: url(/fonts/playfair-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/sourceserif.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(/fonts/sourceserif-italic.woff2) format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/josefin.woff2) format("woff2"); }

:root {
  --paper: #f7f1e5;
  --paper-2: #efe5d1;
  --card: #fffaf0;
  --ink: #14231f;
  --ink-2: #33433e;
  --muted: #59615b;
  --rule: #e2d4b8;
  --accent: #0d5a49;
  --accent-ink: #0a4639;
  --gold: #c9a45c;
  --gold-ink: #85601d;
  --blush: #e6aea4;
  --blush-soft: #f7e4de;
  --sage-soft: #e1ede6;
  --rose-soft: #f7e2dc;
  --sage-ink: #1f5a45;
  --rose-ink: #8a3a2f;
  --focus: #1f5fbf;
  --shadow: 0 1px 2px rgba(40, 30, 10, .06), 0 10px 30px -14px rgba(40, 30, 10, .28);
  --thead: #0f4d40;
  --thead-ink: #f6eedd;
  /* velvet surfaces (theme-independent) */
  --emerald: #0f4d40;
  --night: #0a1a17;
  --velvet: #0d2924;
  --velvet-2: #123731;
  --ivory: #f6eedd;
  --ivory-2: #d8cfbb;
  --gilt: #e2c07f;
  --gilt-2: #c99d4f;
  --line: rgba(226, 192, 127, .3);
  --display: "Playfair Display", "Didot", "Bodoni 72", Georgia, serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --deco: "Josefin Sans", "Futura", "Century Gothic", ui-sans-serif, system-ui, sans-serif;
  --measure: 42rem;
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1714; --paper-2: #0f201c; --card: #10241f; --ink: #f2eadb; --ink-2: #d9cfbd; --muted: #a9b2a8;
    --rule: #24433b; --accent: #86d9c1; --accent-ink: #a4e6d2; --gold: #e2c07f; --gold-ink: #e8ca8f;
    --blush: #f0b9b0; --blush-soft: #2b1d1c; --sage-soft: #12302a; --rose-soft: #2f1e1d; --sage-ink: #9fd9bd; --rose-ink: #f2b3a8;
    --focus: #8cb4ff; --thead: #123731; --thead-ink: #f6eedd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a1714; --paper-2: #0f201c; --card: #10241f; --ink: #f2eadb; --ink-2: #d9cfbd; --muted: #a9b2a8;
  --rule: #24433b; --accent: #86d9c1; --accent-ink: #a4e6d2; --gold: #e2c07f; --gold-ink: #e8ca8f;
  --blush: #f0b9b0; --blush-soft: #2b1d1c; --sage-soft: #12302a; --rose-soft: #2f1e1d; --sage-ink: #9fd9bd; --rose-ink: #f2b3a8;
  --focus: #8cb4ff; --thead: #123731; --thead-ink: #f6eedd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ivory); color: var(--night); padding: .6rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.no-js .needs-js, [hidden] { display: none !important; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
::selection { background: var(--gilt); color: var(--night); }

@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ornament divider: deco line, fan and diamond */
.orn {
  height: 22px; width: min(320px, 70%); margin: 0 auto; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 22'%3E%3Cpath d='M0 11h118M202 11h118' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M0 15h96M224 15h96' stroke='%23000' stroke-width='.6'/%3E%3Cpath d='M136 11a24 24 0 0 1 48 0' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M144 11a16 16 0 0 1 32 0' fill='none' stroke='%23000' stroke-width='.8'/%3E%3Cpath d='M160 3l8 8-8 8-8-8z'/%3E%3Ccircle cx='126' cy='11' r='2.4'/%3E%3Ccircle cx='194' cy='11' r='2.4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 22'%3E%3Cpath d='M0 11h118M202 11h118' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M0 15h96M224 15h96' stroke='%23000' stroke-width='.6'/%3E%3Cpath d='M136 11a24 24 0 0 1 48 0' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M144 11a16 16 0 0 1 32 0' fill='none' stroke='%23000' stroke-width='.8'/%3E%3Cpath d='M160 3l8 8-8 8-8-8z'/%3E%3Ccircle cx='126' cy='11' r='2.4'/%3E%3Ccircle cx='194' cy='11' r='2.4'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ------------------------------------------------------------ header */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--gilt-2), #fff1c7, var(--gilt)); box-shadow: 0 0 12px rgba(226, 192, 127, .8); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 26, 23, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--ivory);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; flex: none; }
.brand .mark { width: 2.3rem; height: 2.3rem; overflow: visible; }
.brand .hat { transform-origin: 22px 42px; transition: transform .45s var(--ease); }
.brand .glint { opacity: 0; transform-origin: 47px 19px; transition: opacity .3s, transform .5s var(--ease); }
.brand:hover .hat, .brand:focus-visible .hat { transform: rotate(-16deg) translate(-1px, -5px); }
.brand:hover .glint, .brand:focus-visible .glint { opacity: 1; transform: rotate(45deg) scale(1.15); }
.brand-name { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: .01em; color: var(--ivory); }
.site-header .brand-name { background: linear-gradient(180deg, #fff3cf, var(--gilt) 60%, var(--gilt-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { margin-left: auto; }
.topnav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.topnav a {
  display: block; padding: .45rem .55rem; color: var(--ivory-2); text-decoration: none;
  font-family: var(--deco); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  border-radius: 999px; position: relative; white-space: nowrap;
}
.topnav a::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 1px; background: var(--gilt); transform: scaleX(0); transition: transform .3s var(--ease); }
.topnav a:hover { color: #fff; }
.topnav a:hover::after, .topnav a[aria-current="page"]::after { transform: scaleX(1); }
.topnav a[aria-current="page"] { color: var(--gilt); }
.nav-salon a { color: var(--gilt); border: 1px solid var(--line); }
.header-actions { display: flex; gap: .4rem; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; gap: .45rem; height: 2.4rem; min-width: 2.4rem; justify-content: center;
  padding: 0 .65rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--ivory); font: 600 .78rem/1 var(--deco); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: rgba(226, 192, 127, .14); border-color: var(--gilt); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.icon-btn kbd { font: 600 .7rem/1 var(--deco); padding: .2rem .35rem; border: 1px solid var(--line); border-radius: 6px; color: var(--gilt); }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: inline; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: inline; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
@media (max-width: 1380px) { .search-label { display: none; } }
@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; gap: .25rem .75rem; padding-top: .5rem; }
  .header-actions { margin-left: auto; }
  .topnav { order: 3; width: 100%; margin: 0 -1rem; padding: 0 1rem .4rem; overflow-x: auto; scrollbar-width: none;
    -webkit-mask: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 2rem), transparent); mask: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 2rem), transparent); }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav ul { width: max-content; padding-right: 1.5rem; }
  .icon-btn kbd { display: none; }
}

/* ------------------------------------------------------------ type */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; font-weight: 700; letter-spacing: -.005em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 1.6rem + 3vw, 4rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(1.55rem, 1.3rem + 1vw, 2.1rem); margin: 2.2em 0 .55em; }
h3 { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); margin: 1.7em 0 .4em; }
p { margin: 0 0 1em; }
.kicker { font-family: var(--deco); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .2em; color: var(--gold-ink); margin: 0 0 .5rem; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.dek { font-size: clamp(1.12rem, 1.02rem + .4vw, 1.35rem); line-height: 1.55; color: var(--ink-2); max-width: 44rem; }
.byline { font-family: var(--deco); font-size: .82rem; letter-spacing: .06em; color: var(--muted); margin: 0; }
.fine { font-size: .9rem; color: var(--muted); }
.section-h { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem); text-align: center; margin: 3.5rem 0 1.6rem; position: relative; }
.section-h::after { content: ""; display: block; width: 90px; height: 10px; margin: .6rem auto 0; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 10'%3E%3Cpath d='M0 5h36M54 5h36' stroke='%23000'/%3E%3Cpath d='M45 0l5 5-5 5-5-5z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 10'%3E%3Cpath d='M0 5h36M54 5h36' stroke='%23000'/%3E%3Cpath d='M45 0l5 5-5 5-5-5z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ------------------------------------------------------------ stage (page head band) */
.stage {
  position: relative; isolation: isolate; color: var(--ivory); padding: 2.2rem 0 1.4rem; margin-bottom: 2.5rem;
  background:
    radial-gradient(120% 90% at 50% -10%, #1d5a4c 0%, rgba(13, 41, 36, 0) 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(230, 174, 164, .16), transparent 70%),
    linear-gradient(180deg, var(--velvet), var(--night));
}
.stage-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    repeating-conic-gradient(from 180deg at 50% -20%, rgba(226, 192, 127, .07) 0deg 1.5deg, transparent 1.5deg 7deg),
    radial-gradient(circle at 50% 100%, transparent 0 15px, rgba(226, 192, 127, .22) 15px 16px, transparent 16px) 0 100% / 34px 17px repeat-x;
  -webkit-mask: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .6)); mask: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, .6)); }
.stage .orn { margin-top: 1.4rem; background: var(--gilt); opacity: .8; }
.stage h1 { color: var(--ivory); max-width: 22ch; }
.stage h1 em { font-style: italic; color: var(--gilt); }
.stage .kicker { color: var(--gilt); }
.stage .dek { color: var(--ivory-2); }
.stage .byline { color: #b9c2b5; }
.stage a { color: var(--gilt); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .2rem; list-style: none; margin: 0 0 1rem; padding: 0; font-family: var(--deco); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #b9c2b5; }
.crumbs li + li::before { content: "◆"; margin: 0 .5rem; font-size: .5rem; color: var(--gilt); vertical-align: .2em; }
.crumbs a { color: var(--ivory-2); text-decoration: none; }
.crumbs a:hover { color: var(--gilt); }
.notfound .pill-list { margin-top: 1rem; }

/* ------------------------------------------------------------ article layout */
.article-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.article-side { position: sticky; top: 5.5rem; }
.toc { font-size: .95rem; border-left: 1px solid var(--rule); padding-left: 1rem; }
.toc-h { font-family: var(--deco); font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: .1rem 0; }
.toc a { display: block; padding: .25rem 0 .25rem .2rem; color: var(--ink-2); text-decoration: none; line-height: 1.35; position: relative; transition: color .2s, transform .2s; }
.toc a::before { content: counter(toc, upper-roman) "."; font-family: var(--display); color: var(--gold-ink); margin-right: .45rem; font-size: .85em; }
.toc a:hover, .toc a.is-current { color: var(--accent); transform: translateX(3px); }
.toc a.is-current::after { content: ""; position: absolute; left: -1.07rem; top: .3rem; bottom: .3rem; width: 2px; background: var(--gold); }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article-side { position: static; }
  .toc { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 2rem; background: var(--card); }
  .toc ol { columns: 2; column-gap: 1.5rem; }
}
@media (max-width: 520px) { .toc ol { columns: 1; } }

/* ------------------------------------------------------------ prose */
.prose { max-width: var(--measure); min-width: 0; }
.prose-wide { max-width: 48rem; margin-inline: auto; }
.prose-solo { margin-inline: auto; }
.prose > :first-child { margin-top: 0; }
.prose h2 { position: relative; padding-top: .9rem; }
.prose h2::before { content: ""; position: absolute; top: 0; left: 0; width: 3.5rem; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--gold-ink); }
.prose strong { color: var(--ink); }
a.ext::after { content: "↗"; font-size: .7em; margin-left: .12em; vertical-align: .35em; opacity: .65; text-decoration: none; display: inline-block; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .9rem; margin: 1.8rem 0 2rem; }
.stat { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1rem .9rem; box-shadow: var(--shadow); overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold), var(--blush), var(--gold)); }
.stat b { display: block; font-family: var(--display); font-size: 2.1rem; line-height: 1.05; color: var(--gold-ink); font-weight: 800; }
.stat span { display: block; font-size: .95rem; line-height: 1.4; margin: .35rem 0 .5rem; color: var(--ink-2); }
.stat a { font-family: var(--deco); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.callout { position: relative; background: var(--blush-soft); border: 1px solid color-mix(in srgb, var(--blush) 60%, transparent); border-radius: var(--radius); padding: 1.2rem 1.3rem 1rem 1.4rem; margin: 2rem 0; }
.callout::before { content: ""; position: absolute; left: -1px; top: 1.2rem; bottom: 1.2rem; width: 3px; border-radius: 3px; background: var(--gold); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-family: var(--display); font-style: italic; font-size: 1.2rem; font-weight: 700; margin-bottom: .35rem; color: var(--ink); }
.callout.tip { background: var(--sage-soft); border-color: color-mix(in srgb, var(--sage-ink) 25%, transparent); }

ul.check { list-style: none; padding-left: 0; }
ul.check li { position: relative; padding-left: 2rem; }
ul.check li::before { content: ""; position: absolute; left: 0; top: .45em; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--gold); opacity: .2; }
ul.check li::after { content: ""; position: absolute; left: .4rem; top: .58em; width: .32rem; height: .6rem; border: solid var(--gold-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.dodont > div { border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid var(--rule); }
.dodont .do { background: var(--sage-soft); }
.dodont .dont { background: var(--rose-soft); }
.dodont h3, .dodont h4 { margin: 0 0 .5rem; font-size: 1.15rem; font-family: var(--deco); text-transform: uppercase; letter-spacing: .15em; }
.dodont .do h3, .dodont .do h4 { color: var(--sage-ink); }
.dodont .dont h3, .dodont .dont h4 { color: var(--rose-ink); }
.dodont ul { list-style: none; margin: 0; padding: 0; }
.dodont li { position: relative; padding-left: 1.5rem; font-size: .98rem; }
.dodont .do li::before { content: "✓"; position: absolute; left: 0; color: var(--sage-ink); font-weight: 700; }
.dodont .dont li::before { content: "✕"; position: absolute; left: 0; color: var(--rose-ink); font-weight: 700; }
@media (max-width: 640px) { .dodont { grid-template-columns: 1fr; } }

.template { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 1.4rem 1.5rem 1rem; margin: 1rem 0 1.6rem; box-shadow: var(--shadow), 6px 6px 0 -1px var(--paper-2), 6px 6px 0 0 var(--rule); }
.template p:last-child { margin-bottom: 0; font-style: italic; }
.template-label { font-family: var(--deco); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--gold-ink); }

.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.45; }
caption { text-align: left; padding: .9rem 1rem .6rem; font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--ink-2); }
th, td { text-align: left; vertical-align: top; padding: .65rem 1rem; border-top: 1px solid var(--rule); }
thead th { background: var(--thead); color: var(--thead-ink); font-family: var(--deco); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; border-top: 0; }
tbody th { font-weight: 600; color: var(--ink); }
tbody tr { transition: background .2s; }
tbody tr:hover { background: color-mix(in srgb, var(--gold) 9%, transparent); }
@media (max-width: 560px) { th, td { padding: .55rem .7rem; } }

.faq { margin-top: 3rem; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:first-of-type { border-top: 1px solid var(--rule); }
.faq-item summary { list-style: none; cursor: pointer; padding: 1rem 2.5rem 1rem 0; position: relative; font-family: var(--display); font-weight: 600; font-size: 1.12rem; line-height: 1.35; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: .25rem; top: .75rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-ink); font-family: var(--serif); transition: transform .3s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-a { padding: 0 0 1rem; color: var(--ink-2); }
.sources { margin-top: 3rem; font-size: .93rem; }
.sources h2 { font-size: 1.35rem; }
.sources ol { padding-left: 1.4rem; }
.sources li { margin: .3rem 0; }
.source-list { list-style: none; padding: 0; }
.source-list li { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.source-list .used { display: block; font-size: .88rem; color: var(--muted); }

/* ------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.2rem; }
.card { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.35rem 1.35rem 1.1rem; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card::before { content: ""; position: absolute; inset: 6px; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: calc(var(--radius) - 5px); pointer-events: none; opacity: 0; transition: opacity .35s; }
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow), 0 18px 40px -22px rgba(201, 164, 92, .7); }
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card-title { margin: .2rem 0 .5rem; font-size: 1.3rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-title a:focus-visible { outline: none; }
.card-title a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.card p { font-size: .98rem; color: var(--ink-2); }
.card-meta { font-family: var(--deco); font-size: .74rem !important; letter-spacing: .12em; text-transform: uppercase; margin: 0; color: var(--muted) !important; }
.cards-lg .card-title { font-size: 1.5rem; }
.related { margin-top: 3rem; }
.card, .tool-card, .flip-in, .promo { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='rotate(-14 16 16)'%3E%3Cpath d='M9 22c0-6 .8-11 1.6-14h10.8c.8 3 1.6 8 1.6 14z' fill='%230b1513' stroke='%23e2c07f'/%3E%3Cpath d='M9.4 18.5h13.2l.3 2.8H9.1z' fill='%23e2c07f'/%3E%3Cellipse cx='16' cy='23' rx='11' ry='2.6' fill='%230b1513' stroke='%23e2c07f'/%3E%3C/g%3E%3C/svg%3E") 16 16, pointer; }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.pill-list a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--card); font-size: .95rem; transition: border-color .2s, color .2s, transform .2s; }
.pill-list a:hover { border-color: var(--gold); color: var(--accent); transform: translateY(-2px); }
.stage .pill-list a { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--ivory); }
.other-hubs { margin: 3.5rem auto 1rem; text-align: center; }
.other-hubs h2 { font-size: 1.5rem; }
.other-hubs .pill-list { justify-content: center; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 999px; font: 700 .82rem/1.1 var(--deco); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s, background .25s; }
.btn-gold { background: linear-gradient(180deg, #f6dfa3, var(--gilt) 45%, var(--gilt-2)); color: #1d1608; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 22px -10px rgba(226, 192, 127, .9); }
.btn-gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-gold:hover { color: #1d1608; transform: translateY(-2px); }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line); }
.btn-ghost:hover { color: #fff; border-color: var(--gilt); background: rgba(226, 192, 127, .1); }
.btn:active { transform: scale(.97); }

/* ------------------------------------------------------------ home hero */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--ivory);
  background:
    radial-gradient(70% 70% at 72% 18%, rgba(244, 207, 134, .2), transparent 60%),
    radial-gradient(60% 60% at 10% 100%, rgba(230, 174, 164, .18), transparent 70%),
    radial-gradient(120% 100% at 50% 0%, #17574a 0%, var(--velvet) 50%, var(--night) 100%);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.sparkles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.sunburst { position: absolute; inset: -40% -10% 0; z-index: -2; pointer-events: none;
  background: repeating-conic-gradient(from 180deg at 72% 0%, rgba(226, 192, 127, .09) 0deg 1.2deg, transparent 1.2deg 6deg);
  -webkit-mask: radial-gradient(60% 70% at 72% 0%, #000, transparent 75%); mask: radial-gradient(60% 70% at 72% 0%, #000, transparent 75%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; z-index: -1;
  background: radial-gradient(circle at 50% 100%, transparent 0 15px, rgba(226, 192, 127, .35) 15px 16px, transparent 16px) 0 100% / 34px 17px repeat-x; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 2rem; align-items: center; }
.hero h1 { color: var(--ivory); font-size: clamp(2.8rem, 1.6rem + 5vw, 5.6rem); line-height: 1; margin: .25em 0 .35em; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; font-weight: 600; background: linear-gradient(180deg, #fff3cf 10%, var(--gilt) 55%, var(--gilt-2)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; }
.hero-kicker { color: var(--gilt); }
.hero .dek { color: var(--ivory-2); max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }
.hero-pills a { background: rgba(255, 255, 255, .05); border-color: var(--line); color: var(--ivory); font-size: .9rem; }
.hero-pills a:hover { color: var(--gilt); }
.hero-art { position: relative; aspect-ratio: 400 / 330; width: 100%; max-width: 34rem; justify-self: center; align-self: start; margin-top: calc(-1 * clamp(2.5rem, 5vw, 4.5rem)); }
.chandelier { width: 100%; height: 100%; overflow: visible; display: block; }
.chandelier .chain, .chandelier .arm, .chandelier .drop, .chandelier .cup { fill: none; stroke: url(#ch-gilt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chandelier .chain { stroke-dasharray: 5 3; stroke-width: 2.4; }
.chandelier .swag { fill: none; stroke: #e9cf95; stroke-width: 2.6; stroke-dasharray: .1 7; stroke-linecap: round; opacity: .85; }
.chandelier .gem { fill: rgba(240, 214, 160, .35); stroke: #f3dca6; stroke-width: 1; }
.chandelier .gem.big { fill: rgba(240, 185, 176, .45); }
.chandelier .wax { fill: #f7efdd; }
.chandelier .flame { fill: #ffe7a3; }
.chandelier .glow { mix-blend-mode: screen; }
.ch-sway { transform-origin: 200px 0; }
@media (prefers-reduced-motion: no-preference) {
  .ch-sway { animation: sway 9s ease-in-out infinite; }
  .chandelier .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 2.4s ease-in-out infinite; }
  .chandelier .f1 { animation-delay: -.8s; } .chandelier .f2 { animation-delay: -1.6s; }
  .chandelier .glow { animation: glow 3.2s ease-in-out infinite; }
  .chandelier .g1 { animation-delay: -1s; } .chandelier .g2 { animation-delay: -2s; }
  .hero h1 em { background-size: 100% 220%; animation: gilt 6s ease-in-out infinite alternate; }
}
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(.92, 1.08); } 60% { transform: scale(1.05, .94); } }
@keyframes glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes gilt { from { background-position: 0 0; } to { background-position: 0 100%; } }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-art { order: -1; max-width: 15rem; margin: calc(-1 * clamp(2.5rem, 5vw, 4.5rem)) auto -.5rem; }
  .hero-pills li:nth-child(n+4) { display: none; }
}

/* quick answers: flip cards */
.quick-wrap .section-h { margin-top: 3rem; }
.flips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; }
.flip { perspective: 1200px; }
.flip-in { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.flip-face { grid-area: 1 / 1; display: flex; flex-direction: column; min-height: 13.5rem; padding: 1.3rem 1.3rem 1.1rem; border-radius: var(--radius); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip-front { background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.flip-front::after { content: "?"; position: absolute; right: 1rem; bottom: .2rem; font: italic 800 5rem/1 var(--display); color: var(--gold); opacity: .18; }
.flip-k { font-family: var(--deco); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 .5rem; }
.flip-q { margin: 0 0 1rem; font-size: 1.3rem; }
.flip-back { background: linear-gradient(160deg, var(--velvet-2), var(--night)); color: var(--ivory); border: 1px solid var(--line); transform: rotateY(180deg); box-shadow: var(--shadow); }
.flip-a { font-family: var(--display); font-size: 1.25rem; line-height: 1.35; }
.flip-back a { color: var(--gilt); font-family: var(--deco); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.flip-btn { margin-top: auto; align-self: flex-start; font: 700 .74rem/1 var(--deco); letter-spacing: .14em; text-transform: uppercase; padding: .65rem .95rem; border-radius: 999px; cursor: pointer; border: 1px solid var(--gold); background: transparent; color: var(--gold-ink); transition: background .2s, color .2s; }
.flip-btn:hover { background: var(--gold); color: #1d1608; }
.flip-back .flip-btn { border-color: var(--line); color: var(--ivory-2); }
.flip-back .flip-btn:hover { background: var(--gilt); color: #1d1608; }
.flip-front { position: relative; }
.flip.is-flipped .flip-in { transform: rotateY(180deg); }
.js .flip:not(.is-flipped) .flip-back, .js .flip.is-flipped .flip-front { visibility: hidden; transition: visibility 0s .4s; }
.no-js .flip-in { display: flex; flex-direction: column; gap: .6rem; transform: none; }
.no-js .flip-back { transform: none; min-height: 0; }
.no-js .flip-face { min-height: 0; }
@media (prefers-reduced-motion: reduce) { .flip-in { transition: none; } }

/* salon tools band */
.salon-band { margin-top: 1rem; }
.salon-head { text-align: center; max-width: 40rem; margin: 3.5rem auto 1.6rem; }
.salon-head .section-h { margin: .2rem 0 .8rem; }
.salon-head p:last-child { color: var(--ink-2); }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1.2rem; }
.tool-card { position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; padding: 1.5rem 1.4rem 1.2rem; color: var(--ivory);
  background: radial-gradient(120% 80% at 100% 0%, rgba(226, 192, 127, .2), transparent 55%), linear-gradient(165deg, var(--velvet-2), var(--night));
  border: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(5, 20, 16, .9); transition: transform .45s var(--ease), box-shadow .45s; }
.tool-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(226, 192, 127, .22); border-radius: 14px; pointer-events: none; }
.tool-card::after { content: ""; position: absolute; inset: -50%; z-index: -1; background: conic-gradient(from 0deg, transparent 0 70%, rgba(226, 192, 127, .25) 80%, transparent 90%); opacity: 0; transition: opacity .4s; }
.tool-card:hover, .tool-card:focus-within { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 30px 50px -26px rgba(5, 20, 16, .95), 0 0 0 1px var(--gilt); }
.tool-card:hover::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .tool-card:hover::after { animation: spin 6s linear infinite; } }
@keyframes spin { to { transform: rotate(1turn); } }
.tool-card .kicker { color: var(--gilt); }
.tool-card .card-title { font-size: 1.55rem; margin: .1rem 0 .3rem; }
.tool-card .card-title a { color: var(--ivory); text-decoration: none; }
.tool-card .card-title a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.tool-card .card-title a:focus-visible { outline: none; }
.tool-card .card-title a:focus-visible::after { outline: 3px solid var(--gilt); outline-offset: -4px; }
.tool-card p { color: var(--ivory-2); font-size: .97rem; }
.tool-tag { font-family: var(--display); font-style: italic; color: var(--gilt) !important; font-size: 1.05rem !important; }
.card-cta { font: 700 .75rem/1 var(--deco); letter-spacing: .18em; text-transform: uppercase; color: var(--gilt) !important; margin: 0; }
.card-cta span { display: inline-block; transition: transform .3s var(--ease); }
.tool-card:hover .card-cta span { transform: translateX(6px); }
.emblem { width: 3.4rem; height: 3.4rem; color: var(--gilt); margin-bottom: .6rem; }
.emblem svg { width: 100%; height: 100%; display: block; }
.tool-card .emblem { transition: transform .5s var(--ease); }
.tool-card:hover .emblem { transform: rotate(-10deg) scale(1.08); }
.tool-cards-lg .tool-card { padding: 2rem 1.8rem 1.5rem; }

.home-body { margin-top: 3.5rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.2rem; }
.hub-card { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.4rem 1rem; box-shadow: var(--shadow); overflow: hidden; }
.hub-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 8px, color-mix(in srgb, var(--gold) 30%, transparent) 8px 9px); opacity: .6; }
.hub-card h3 { margin: 0 0 .4rem; font-size: 1.45rem; }
.hub-card h3 a { color: var(--ink); text-decoration: none; }
.hub-card h3 a:hover { color: var(--accent); }
.hub-card p { font-size: .96rem; color: var(--ink-2); }
.hub-card ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.hub-card li { border-bottom: 1px solid var(--rule); }
.hub-card li:last-child { border-bottom: 0; }
.hub-card li a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; text-decoration: none; color: var(--ink-2); font-size: .98rem; }
.hub-card li a::after { content: "→"; color: var(--gold-ink); transition: transform .25s var(--ease); }
.hub-card li a:hover { color: var(--accent); }
.hub-card li a:hover::after { transform: translateX(4px); }

/* article promos into the Salon */
.salon-promo { display: grid; gap: .75rem; margin: 2.5rem 0; }
.promo { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius); text-decoration: none; color: var(--ivory);
  background: radial-gradient(100% 140% at 100% 0%, rgba(226, 192, 127, .2), transparent 60%), linear-gradient(160deg, var(--velvet-2), var(--night));
  border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.promo:hover { color: var(--ivory); transform: translateY(-3px); box-shadow: 0 0 0 1px var(--gilt), 0 18px 30px -20px rgba(5, 20, 16, .9); }
.promo .emblem { width: 2.8rem; height: 2.8rem; margin: 0; flex: none; }
.promo-t { display: flex; flex-direction: column; line-height: 1.3; }
.promo-k { font: 700 .68rem/1.2 var(--deco); letter-spacing: .18em; text-transform: uppercase; color: var(--gilt); }
.promo strong { font-family: var(--display); font-size: 1.25rem; color: var(--ivory); }
.promo-t > span:last-child { color: var(--ivory-2); font-size: .95rem; }
.promo-go { margin-left: auto; font-size: 1.4rem; color: var(--gilt); transition: transform .3s var(--ease); }
.promo:hover .promo-go { transform: translateX(5px); }

/* ------------------------------------------------------------ tool pages */
.tool-stage .emblem-lg { width: 5rem; height: 5rem; flex: none; margin-top: .6rem; }
.tool-head { display: flex; gap: 1.4rem; align-items: flex-start; }
@media (max-width: 640px) { .tool-head { flex-direction: column; gap: 0; } .tool-stage .emblem-lg { width: 3.6rem; height: 3.6rem; } }
.tool-wrap { margin-bottom: 3rem; }
.tool-frame { position: relative; color: var(--ivory); border-radius: 26px; padding: clamp(1.2rem, 3vw, 2.4rem);
  background: radial-gradient(90% 60% at 100% 0%, rgba(226, 192, 127, .14), transparent 60%), radial-gradient(70% 70% at 0% 100%, rgba(230, 174, 164, .1), transparent 70%), linear-gradient(170deg, var(--velvet-2), var(--night));
  border: 1px solid var(--line); box-shadow: 0 40px 70px -40px rgba(5, 20, 16, .9); }
.tool-frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(226, 192, 127, .2); border-radius: 18px; pointer-events: none; }
.tool-h { color: var(--ivory); margin: 0 0 1.2rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.tool-h::before { content: "◆"; color: var(--gilt); font-size: .55em; vertical-align: .3em; margin-right: .6rem; }
.tool-frame a { color: var(--gilt); }
.tool-frame .hint { font-size: .88rem; color: #b9c2b5; margin: .35rem 0 0; }
.tool-ref { max-width: 52rem; margin: 2.5rem auto 0; }
.tool-ref h2 { text-align: center; }
.tool-prose { margin-top: 1rem; }
.noscript-note { background: rgba(230, 174, 164, .15); border: 1px dashed var(--blush); padding: .8rem 1rem; border-radius: 12px; color: var(--ivory); }
.field { margin: 0 0 1.1rem; border: 0; padding: 0; min-width: 0; }
.field > label, .flabel, .field legend, .chips legend { display: block; font: 700 .76rem/1.3 var(--deco); letter-spacing: .16em; text-transform: uppercase; color: var(--gilt); margin-bottom: .5rem; padding: 0; }
.tool-frame input[type="text"], .tool-frame input[type="number"], .tool-frame select {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ivory); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; transition: border-color .2s, box-shadow .2s; }
.tool-frame select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gilt) 50%), linear-gradient(135deg, var(--gilt) 50%, transparent 50%); background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.4rem; }
.tool-frame select option { color: #14231f; background: #fff; }
.tool-frame input::placeholder { color: #8f998f; }
.tool-frame input:focus, .tool-frame select:focus { outline: none; border-color: var(--gilt); box-shadow: 0 0 0 3px rgba(226, 192, 127, .3); }
.tool-frame :focus-visible { outline-color: #9cc2ff; }
.money { position: relative; }
.money span { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--gilt); font-family: var(--display); font-size: 1.2rem; }
.money input { padding-left: 2rem !important; font-family: var(--display) !important; font-size: 1.5rem !important; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .98rem; color: var(--ivory-2); transition: all .2s; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg label:has(input:checked) { background: var(--gilt); color: #1d1608; border-color: var(--gilt); }
.seg label:has(input:focus-visible) { outline: 3px solid #9cc2ff; outline-offset: 2px; }
.switch { display: inline-flex !important; align-items: center; gap: .7rem; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font: 1rem/1.3 var(--serif) !important; color: var(--ivory-2) !important; }
.switch input { appearance: none; width: 2.8rem; height: 1.6rem; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid var(--line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .25s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--ivory); transition: transform .3s var(--ease); }
.switch input:checked { background: var(--gilt); }
.switch input:checked::after { transform: translateX(1.2rem); background: #1d1608; }

/* tip calculator */
.tipcalc .tool-frame { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem 2.2rem; }
.tipcalc .tool-h { grid-column: 1 / -1; margin-bottom: 0; }
.chips { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; }
.chip { position: relative; display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s, transform .2s; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--ivory); line-height: 1.2; }
.chip-range { font-size: .8rem; color: #b9c2b5; line-height: 1.3; }
.chip:hover { border-color: var(--gilt); transform: translateY(-2px); }
.chip:has(input:checked) { background: linear-gradient(160deg, rgba(226, 192, 127, .28), rgba(226, 192, 127, .08)); border-color: var(--gilt); box-shadow: 0 0 0 1px var(--gilt), 0 10px 24px -14px rgba(226, 192, 127, .8); }
.chip:has(input:checked) .chip-range { color: var(--gilt); }
.chip:has(input:focus-visible) { outline: 3px solid #9cc2ff; outline-offset: 2px; }
.tip-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.tip-inputs [data-for="quality"], .tip-inputs [data-for="round"], .tip-inputs [data-for="bar"] { grid-column: 1 / -1; }
input[type="range"] { width: 100%; appearance: none; height: 2.2rem; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--blush), var(--gilt)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--blush), var(--gilt)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 1.6rem; height: 1.6rem; margin-top: -.55rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6d8, var(--gilt) 55%, var(--gilt-2)); border: 2px solid var(--night); box-shadow: 0 0 0 2px var(--gilt), 0 4px 10px rgba(0, 0, 0, .4); }
input[type="range"]::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--gilt); border: 2px solid var(--night); box-shadow: 0 0 0 2px var(--gilt); }
.qual-out { font-family: var(--display); font-style: italic; font-size: 1.1rem !important; color: var(--gilt) !important; }
.stepper { display: flex; align-items: center; gap: .4rem; }
.stepper input { width: 4.5rem !important; text-align: center; font-family: var(--display) !important; font-size: 1.3rem !important; padding: .5rem !important; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.stepper span { color: var(--ivory-2); }
.step { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--gilt); font-size: 1.3rem; cursor: pointer; transition: background .2s; }
.step:hover { background: rgba(226, 192, 127, .18); }
.tip-result { position: sticky; top: 5.5rem; align-self: start; text-align: center; padding: 1.6rem 1.3rem 1.2rem; border-radius: 20px; border: 1px solid var(--gilt);
  background: radial-gradient(120% 80% at 50% 0%, rgba(226, 192, 127, .25), transparent 65%), rgba(0, 0, 0, .25); }
.res-kicker { font: 700 .74rem/1 var(--deco); letter-spacing: .24em; text-transform: uppercase; color: var(--gilt); margin: 0 0 .5rem; }
.res-big { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.1rem); line-height: 1.05; margin: 0 0 1rem; color: #fff5d6; text-shadow: 0 0 30px rgba(226, 192, 127, .45); font-variant-numeric: tabular-nums; }
.res-big.is-text { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.res-big.pop { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(.94); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: 0 0 1rem; }
.res-grid div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: .55rem .3rem; }
.res-grid dt { font: 700 .66rem/1.2 var(--deco); letter-spacing: .14em; text-transform: uppercase; color: #b9c2b5; }
.res-grid dd { margin: .2rem 0 0; font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--ivory); font-variant-numeric: tabular-nums; }
.res-note { font-size: .95rem; color: var(--ivory-2); }
.res-src { font-size: .82rem; color: #b9c2b5; margin: 0; }
@media (max-width: 860px) {
  .tipcalc .tool-frame { grid-template-columns: 1fr; }
  .tip-result { position: relative; top: 0; }
}
@media (max-width: 480px) { .tip-inputs { grid-template-columns: 1fr; } .res-grid dd { font-size: .92rem; } .chip-grid { grid-template-columns: 1fr 1fr; } }

/* quiz */
.quiz-top { display: grid; gap: .6rem; margin-bottom: 1.4rem; }
.js .quiz.is-live .qnum { display: none; }
.quiz-top .tool-h { margin: 0; }
.quiz-intro { color: var(--ivory-2); margin: 0; max-width: 40rem; }
.quiz-meter { margin-top: .4rem; }
.quiz-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blush), var(--gilt)); border-radius: 8px; transition: width .5s var(--ease); }
#quiz-count { font: 700 .74rem/1 var(--deco); letter-spacing: .16em; text-transform: uppercase; color: var(--gilt); margin: .55rem 0 0; }
.quiz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.qcard fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.qcard { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 18px; padding: 1.3rem 1.3rem 1rem; }
.js .quiz.is-live .qcard { background: transparent; border: 0; padding: 0; }
.qnum { display: block; font: 700 .72rem/1 var(--deco); letter-spacing: .2em; text-transform: uppercase; color: var(--gilt); margin-bottom: .6rem; }
.qtext { display: block; font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem); line-height: 1.25; color: var(--ivory); margin-bottom: 1rem; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.opt { position: relative; width: 100%; font: inherit; text-align: left; display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s, transform .2s; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt-l { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font: 700 .85rem/1 var(--deco); border: 1px solid var(--gilt); color: var(--gilt); transition: all .2s; }
.opt-t { color: var(--ivory); font-size: 1.04rem; line-height: 1.4; }
.opt:hover { border-color: var(--gilt); transform: translateX(4px); }
.opt:has(input:focus-visible) { outline: 3px solid #9cc2ff; outline-offset: 2px; }
.opt:has(input:checked) { border-color: var(--gilt); background: rgba(226, 192, 127, .12); }
.opt.is-right { border-color: #8fdcb9; background: rgba(143, 220, 185, .14); }
.opt.is-right .opt-l { background: #8fdcb9; border-color: #8fdcb9; color: #0a1a17; }
.opt.is-wrong { border-color: var(--blush); background: rgba(230, 174, 164, .14); }
.opt.is-wrong .opt-l { background: var(--blush); border-color: var(--blush); color: #0a1a17; }
.quiz.is-answered .opt { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .opt.is-wrong { animation: shake .45s; }
  .qcard.is-entering { animation: enter .55s var(--ease); }
}
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes enter { from { opacity: 0; transform: translateX(30px) rotate(.5deg); } }
.qans { margin-top: .8rem; color: var(--ivory-2); }
.qans summary { cursor: pointer; font: 700 .76rem/1.2 var(--deco); letter-spacing: .14em; text-transform: uppercase; color: var(--gilt); }
.qans p { margin: .6rem 0 0; }
.qfeedback { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.qfeedback h3 { margin: 0 0 .3rem; color: var(--ivory); font-size: 1.3rem; }
.qfeedback p { color: var(--ivory-2); margin: 0 0 .6rem; }
.qfeedback .btn { margin-top: .3rem; }
.qlink { font-size: .92rem; }
.quiz-end { text-align: center; padding: 1rem 0 .5rem; }
.quiz-end:focus { outline: none; }
.quiz-title { font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(2.4rem, 1.6rem + 4vw, 4.4rem); line-height: 1.02; margin: .2rem 0 .6rem;
  background: linear-gradient(180deg, #fff3cf 10%, var(--gilt) 55%, var(--gilt-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-score { font: 700 .9rem/1 var(--deco); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory); }
.quiz-line { font-size: 1.15rem; color: var(--ivory-2); max-width: 34rem; margin: .6rem auto 1.2rem; }
.quiz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.quiz-review { text-align: left; margin: 1.8rem auto 0; max-width: 40rem; }
.quiz-review h3 { color: var(--ivory); font-size: 1.2rem; }
.quiz-review ul { padding-left: 1.2rem; color: var(--ivory-2); }
.quiz-review li { margin: .3rem 0; }
@media (prefers-reduced-motion: no-preference) { .quiz-end:not([hidden]) .quiz-title { animation: crown 1s var(--ease); } }
@keyframes crown { from { opacity: 0; transform: scale(.7) translateY(20px); letter-spacing: .2em; } }

/* note generator */
.note-cols { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 2rem; align-items: start; }
.slots .field input { font-size: 1rem; }
.note-paper-wrap { position: sticky; top: 5.5rem; }
.note-paper { position: relative; color: #2a2118; background: #fbf5e8; border-radius: 6px; padding: 2rem 2rem 1.6rem; min-height: 18rem; font-size: 1.08rem; line-height: 1.7;
  background-image: radial-gradient(120% 60% at 0 0, rgba(201, 164, 92, .1), transparent 60%), repeating-linear-gradient(180deg, transparent 0 1.82rem, rgba(15, 77, 64, .06) 1.82rem 1.85rem);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 164, 92, .5), inset 0 0 0 8px #fbf5e8, inset 0 0 0 9px rgba(201, 164, 92, .55); transform: rotate(-.6deg); transition: transform .4s var(--ease); }
.note-paper:hover { transform: rotate(0); }
.note-paper::after { content: ""; position: absolute; right: 1.2rem; top: -1rem; width: 3rem; height: 3rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d97a6c, #9b3b30 70%); box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.note-paper p { margin: 0 0 .9rem; }
.note-paper p:first-child, .note-paper p:last-child { font-family: var(--display); font-style: italic; font-size: 1.15rem; }
.note-paper mark { background: linear-gradient(transparent 62%, rgba(201, 164, 92, .45) 62%); color: inherit; padding: 0 .05em; }
.note-paper .slot { color: #8a3a2f; background: rgba(230, 174, 164, .28); border-bottom: 1px dashed #8a3a2f; border-radius: 3px; padding: 0 .15em; }
.note-paper.pop { animation: pop .45s var(--ease); }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.4rem 0 .4rem; }
.note-actions .hint { margin: 0 !important; }
@media (max-width: 860px) { .note-cols { grid-template-columns: 1fr; } .note-paper-wrap { position: relative; top: 0; } }

/* tipping explorer */
.explorer { margin: 2.5rem 0; }
.explorer .tool-frame { padding: clamp(1rem, 2.5vw, 1.8rem); }
.explorer-intro { color: var(--ivory-2); font-size: 1rem; }
.explorer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.tilemap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); grid-auto-rows: auto; gap: 4px; }
.tilemap li { grid-column: var(--c); grid-row: var(--r); }
.tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; text-decoration: none; color: var(--ivory-2); border: 1px dashed rgba(226, 192, 127, .35); font: 700 .66rem/1 var(--deco); letter-spacing: .04em; transition: transform .2s var(--ease), box-shadow .2s, background .2s; position: relative; }
.tile .tile-name { display: none; }
.tile:hover, .tile:focus-visible { transform: scale(1.18); z-index: 2; color: #fff; border-style: solid; }
.tile.has-data { border: 0; color: #0a1a17; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.tile.has-note { border-style: solid; border-color: var(--blush); color: var(--blush); }
.lvl-none { background: #8fdcb9; } .lvl-low { background: #efdcae; } .lvl-mid { background: #e2b866; } .lvl-high { background: #e0905c; }
.lvl-check { border: 1px dashed rgba(226, 192, 127, .6); }
.tile.is-active { transform: scale(1.22); box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--gilt), 0 0 22px rgba(226, 192, 127, .8); z-index: 3; }
.passport { position: relative; border: 2px dashed rgba(226, 192, 127, .55); border-radius: 18px; padding: 1.2rem 1.3rem 1rem; background: rgba(0, 0, 0, .22); min-height: 13rem; }
.passport::after { content: attr(data-code); position: absolute; right: 1rem; top: .8rem; width: 4rem; height: 4rem; border-radius: 50%; border: 2px solid var(--blush); color: var(--blush); display: grid; place-items: center; font: 700 1.1rem/1 var(--deco); letter-spacing: .1em; transform: rotate(-14deg); opacity: .8; }
.passport.stamp { animation: stamp .45s var(--ease); }
@keyframes stamp { 0% { transform: scale(1.04); } 100% { transform: none; } }
.pp-country { font-family: var(--display); font-weight: 800; font-size: 1.9rem; color: var(--ivory); margin: 0 0 .2rem; padding-right: 4.5rem; }
.pp-say { font-family: var(--display); font-style: italic; color: var(--gilt); margin: 0 0 .9rem; }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0 0 .8rem; }
.pp-grid div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: .65rem .8rem; }
.pp-grid dt { font: 700 .66rem/1.2 var(--deco); letter-spacing: .14em; text-transform: uppercase; color: var(--gilt); }
.pp-grid dd { margin: .3rem 0 0; color: var(--ivory); font-size: .95rem; line-height: 1.4; }
.pp-steps { color: var(--ivory-2); padding-left: 1.2rem; margin: 0 0 .8rem; font-size: .95rem; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 1rem 0 0; padding: 0; font-size: .85rem; color: var(--ivory-2); }
.legend .sw { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -.1em; margin-right: .4rem; }
@media (max-width: 700px) {
  .tilemap { display: flex; flex-wrap: wrap; gap: .35rem; }
  .tile { aspect-ratio: auto; padding: .45rem .65rem; font: 600 .82rem/1.2 var(--serif); letter-spacing: 0; }
  .tile .tile-code { display: none; }
  .tile .tile-name { display: inline; }
  .tile:hover, .tile:focus-visible, .tile.is-active { transform: none; }
  .pp-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ search palette */
.palette { width: min(40rem, calc(100% - 2rem)); max-height: min(36rem, 80vh); padding: 0; border: 1px solid var(--gilt); border-radius: 22px; color: var(--ivory); overflow: hidden;
  background: linear-gradient(170deg, var(--velvet-2), var(--night)); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); margin-top: 12vh; }
.palette::backdrop { background: rgba(5, 14, 12, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.palette[open] { animation: pal .3s var(--ease); }
@keyframes pal { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.pal-top { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.pal-top svg { width: 1.3rem; height: 1.3rem; color: var(--gilt); flex: none; }
.pal-top input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ivory); font: 500 1.35rem/1.3 var(--display); padding: .3rem 0; }
.pal-top input:focus { outline: none; }
.pal-top input::placeholder { color: #8f998f; }
.pal-close { background: transparent; border: 1px solid var(--line); color: var(--ivory-2); border-radius: 8px; font: 700 .7rem/1 var(--deco); padding: .4rem .5rem; cursor: pointer; }
.pal-list { list-style: none; margin: 0; padding: .5rem; overflow-y: auto; max-height: calc(min(36rem, 80vh) - 4.5rem); }
.pal-list li a { display: block; padding: .7rem .85rem; border-radius: 12px; text-decoration: none; color: var(--ivory); }
.pal-list li a small { display: block; color: #b9c2b5; font-size: .85rem; line-height: 1.4; margin-top: .15rem; }
.pal-list li a .pal-s { font: 700 .64rem/1 var(--deco); letter-spacing: .16em; text-transform: uppercase; color: var(--gilt); margin-right: .5rem; }
.pal-list li[aria-selected="true"] a, .pal-list li a:hover { background: rgba(226, 192, 127, .14); box-shadow: inset 3px 0 0 var(--gilt); }
.pal-empty { padding: 1rem; color: var(--ivory-2); }
.pal-list mark { background: none; color: var(--gilt); }

/* ------------------------------------------------------------ reveal + confetti */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 95; background: var(--night); color: var(--ivory); border: 1px solid var(--gilt); padding: .7rem 1.1rem; border-radius: 999px; font: 700 .78rem/1 var(--deco); letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 20px 40px -20px #000; }

/* ------------------------------------------------------------ footer */
.site-footer { margin-top: 5rem; padding: 2.5rem 0 2rem; color: var(--ivory-2);
  background: radial-gradient(80% 100% at 50% 0%, #15483d, transparent 70%), linear-gradient(180deg, var(--velvet), var(--night)); border-top: 1px solid var(--line); }
.site-footer .orn { margin-bottom: 2rem; background: var(--gilt); opacity: .7; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-h { font: 700 .74rem/1 var(--deco); letter-spacing: .2em; text-transform: uppercase; color: var(--gilt); margin: .3rem 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: var(--ivory-2); text-decoration: none; font-size: .96rem; }
.site-footer a:hover { color: var(--gilt); text-decoration: underline; }
.footer-about p { font-size: .96rem; margin-top: .8rem; max-width: 22rem; }
.site-footer .brand-name { background: linear-gradient(180deg, #fff3cf, var(--gilt) 60%, var(--gilt-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-network { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.footer-network p { font-size: .92rem; }
.footer-network a { color: var(--gilt); text-decoration: underline; }
.site-footer .fine { color: #b9c2b5; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

@media print {
  .site-header, .site-footer, .article-side, .related, .progress, .salon-promo, .stage-art, .orn { display: none !important; }
  body { background: #fff; color: #000; }
  .stage { background: none; color: #000; }
  .stage h1, .stage .dek { color: #000; }
  .article-grid { display: block; }
}
/* tool lists inside prose shouldn't inherit prose list spacing */
.prose ul.tilemap, .prose ul.legend, .prose ol.opts, .prose ol.quiz-list { padding-left: 0; }
.prose .tilemap li, .prose .legend li, .prose .opts li { margin: 0; }
.prose .tool-h { padding-top: 0; }
.prose .tool-h::before { position: static; width: auto; height: auto; background: none; }
