/* TakeHome · shared base for /, /setup/ and /app/ (2026-11-13, web-saas: cooler palette, blue-black ink).
   Direction: "The product performs" — stone and blueprint, one family (Plus Jakarta Sans, self-hosted). See DESIGN.md. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #e9eaee;
  --surface: #dcdee5;
  --paper: #f8f8f6;
  --ink: #12151d;
  --muted: #4a4f5d;
  --accent: #2250e0;
  --accent-ink: #ffffff;
  --accent-soft: #dde5fb;
  --night: #0d111c;
  --night-2: #181e30;
  --night-ink: #eef0f7;
  --night-muted: #a7aec4;
  --accent-light: #9db9ff;
  --accent-deep: #14297a;
  --lilac: #e7e5f8;
  --urgent: #b3261e;
  --ok: #1d6b3a;

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.08rem + 0.55vw, 1.5rem);
  --step-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.5rem, 1.2rem + 4.6vw, 5.25rem);

  --margin: clamp(16px, 4vw, 56px);
  --gutter: clamp(12px, 2vw, 24px);
  --max: 1360px;
  --r-tile: 22px;
  --r-ui: 14px;
  --r-btn: 999px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.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; }
.nums { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible, .on-accent :focus-visible { outline-color: #ffffff; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--margin); }

/* type */
.display, h1 { font-size: var(--step-display); font-weight: 750; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; }
.head { font-size: var(--step-head); font-weight: 750; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
.h3 { font-size: var(--step-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.lead { font-size: var(--step-lead); line-height: 1.42; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }

/* links */
.link { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color var(--t-fast) ease; font-weight: 600; }
.link:hover { text-decoration-color: currentColor; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; }

/* the button: one shape, the accent is reserved for the primary action */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 52px; padding: 0 1.5em; border: 0; border-radius: var(--r-btn); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1rem; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap; transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) ease; }
.button:hover { background: #1942b3; }
.button:active { transform: scale(0.97); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.button.quiet { background: var(--ink); color: var(--paper); }
.button.quiet:hover { background: #3a3830; }
.button.light { background: var(--paper); color: var(--ink); }
.button.light:hover { background: #ffffff; }
.button .arw { display: inline-block; transition: transform var(--t-fast) var(--ease); }
.button:hover .arw { transform: translateX(3px); }

/* wordmark: a ticket tab with a speech notch */
.mark { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.0625rem; text-decoration: none; color: inherit; }
.mark svg { flex: none; }

/* header (both pages) */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.top-nav { display: flex; gap: clamp(16px, 2.4vw, 32px); font-size: 0.9375rem; }
.top-nav a { text-decoration: none; font-weight: 600; color: var(--muted); padding: 10px 0; transition: color var(--t-fast) ease; }
.top-nav a:hover { color: var(--ink); }
.top .button { min-height: 44px; font-size: 0.9375rem; padding: 0 1.15em; }
@media (max-width: 899px) { .top-nav { display: none; } }

/* ---------- the ticket email, as Code.gs sends it (product fragment) ---------- */
.ticket { background: #ffffff; color: #1a1f26; border-radius: var(--r-ui); padding: 20px; font-size: 15px; line-height: 1.35; }
.ticket-env { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #4a525c; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #eceff3; } /* taste-skill-ignore: mock email UI */
.ticket-env b { color: #1a1f26; }
.ticket-subj { font-weight: 700; font-size: 15px; color: #1a1f26; margin-bottom: 14px; }
.badge { display: inline-block; border-radius: 4px; padding: 4px 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.03em; background: #e4eaf1; color: #1f3a5f; }
.badge.urgent { background: var(--urgent); color: #ffffff; }
.ticket-title { font-size: 20px; font-weight: 700; padding: 12px 0; }
.ticket-next { background: #eef3f9; border-left: 4px solid #1f3a5f; padding: 12px; }
.ticket-rows { margin-top: 6px; }
.ticket-rows div { padding: 10px 0; border-bottom: 1px solid #eceff3; } /* taste-skill-ignore: mock email UI */
.ticket-rows dt { font-size: 13px; color: #5b6470; padding-bottom: 2px; }
.ticket-rows dd { font-size: 16px; }
.ticket-rows a { color: #1f3a5f; font-weight: 600; }
.ticket-ack { text-align: center; padding: 18px 0 14px; }
.ticket-ack span { display: inline-block; background: #1f3a5f; color: #ffffff; font-weight: 700; padding: 12px 24px; border-radius: 6px; font-size: 15px; }
.ticket-foot { font-size: 13px; color: #4a525c; }
.ticket-foot + .ticket-foot { padding-top: 8px; }
.ticket-id { font-size: 13px; color: #5b6470; padding-top: 12px; word-break: break-all; }

/* demo label */
.demo-tag { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step-small); font-weight: 600; color: var(--muted); }
.demo-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* footer of tiles (both pages) */
.foot { padding: 12px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; }
.ft { border-radius: var(--r-tile); padding: clamp(20px, 2.2vw, 28px); background: var(--surface); min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; }
.ft-statement { grid-column: 1 / span 4; }
.ft-statement p:first-child { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; max-width: 22ch; }
.ft-nav { grid-column: 5 / span 3; }
.ft-nav ul { display: grid; gap: 4px; }
.ft-nav a { text-decoration: none; font-weight: 600; display: inline-block; padding: 4px 0; }
.ft-nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.ft-place { grid-column: 8 / span 2; }
.ft-place .clock { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
.ft-mail { grid-column: 10 / span 3; }
.ft-mail a { font-size: 1.125rem; font-weight: 700; word-break: break-all; display: inline-block; padding: 4px 0; }
.ft-word { grid-column: 1 / span 8; min-height: 320px; background: var(--night); color: var(--night-ink); justify-content: center; align-items: center; overflow: hidden; }
.ft-word p { font-size: clamp(2.5rem, 8.2vw, 7.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.9; white-space: nowrap; }
.ft-go { grid-column: 9 / span 4; min-height: 320px; background: var(--accent); color: var(--accent-ink); text-decoration: none; transition: background-color var(--t-fast) ease; }
.ft-go:hover { background: #1942b3; }
.ft-go p { font-size: 1.75rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; max-width: 12ch; }
.ft-go svg { align-self: flex-end; transition: transform var(--t-mid) var(--ease); }
.ft-go:hover svg { transform: translate(4px, -4px); }
.ft-credits { display: block; grid-column: 1 / -1; min-height: 0; background: transparent; padding: 14px 8px 6px; color: var(--muted); }
.ft-credits a { color: inherit; }
@media (max-width: 899px) {
  .foot { padding: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .ft { padding: 20px; min-height: 0; justify-content: flex-start; }
  .ft-word { grid-column: 1 / -1; order: -2; min-height: 160px; justify-content: center; }
  .ft-word p { font-size: 13vw; }
  .ft-go { grid-column: 1 / -1; order: -1; min-height: 150px; justify-content: space-between; }
  .ft-nav, .ft-mail { grid-column: span 1; }
  .ft-place, .ft-statement { grid-column: span 1; }
  .ft-statement p:first-child { font-size: 1.125rem; }
  .ft-mail a { font-size: 0.9375rem; }
  .ft-credits { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .ft-statement, .ft-mail { grid-column: 1 / -1; }
  .ft-nav, .ft-place { grid-column: span 1; }
  .ft-place .clock { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
