/* SortMySem: paper planner look. Ink on warm paper, sticky-note yellow, red-pen accents. */

:root {
  --paper: #f4efe4;
  --paper-2: #ebe4d4;
  --card: #fffcf5;
  --ink: #1d1b16;
  --ink-2: #4d483f;
  --ink-3: #6f685b;
  --line: #ddd3c1;
  --field: #968a74; /* input borders and small controls: needs 3:1 against the card */
  --edge: #1d1b16; /* outlines on cards, buttons, stickers */
  --hard: #1d1b16; /* the offset "sticker" shadow */
  --dot: rgba(29, 27, 22, 0.09);
  --yellow: #ffd23f;
  --yellow-soft: #fff1b8;
  --on-yellow: #1d1b16;
  --red: #d9482b;
  --red-soft: #fbe2d8;
  --green: #2b6a4d;
  --green-soft: #dcebe1;
  --font-ui: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-read: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17150f;
    --paper-2: #24211a;
    --card: #1f1c16;
    --ink: #f3ecdd;
    --ink-2: #cdc4b2;
    --ink-3: #958d7d;
    --line: #3a342a;
    --field: #7a705e;
    --edge: #6d6454;
    --hard: #000;
    --dot: rgba(243, 236, 221, 0.06);
    --yellow-soft: #3a3116;
    --red: #ff7b58;
    --red-soft: #3a1f17;
    --green: #7ccfa2;
    --green-soft: #1a2f24;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--ink);
  font: 450 16px/1.5 var(--font-ui);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--on-yellow); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.boot { display: grid; place-items: center; min-height: 100vh; }
.boot .spinner { width: 26px; height: 26px; border-width: 3px; }
.noscript { padding: 24px; text-align: center; }

.spinner {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kicker { font-size: 12.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.display { font-size: clamp(40px, 5.6vw, 64px); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; }
.highlight {
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 0.2em;
  text-underline-offset: 0.02em;
  text-decoration-skip-ink: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease, opacity 0.15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--paper-2); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--yellow); color: var(--on-yellow); border-color: var(--hard); box-shadow: 3px 3px 0 var(--hard); }
.btn-primary:hover:not(:disabled) { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--hard); }
.btn-primary:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hard); }
.btn-plain { border-color: transparent; background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn-plain:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.btn-danger { background: #c43d22; border-color: var(--hard); color: #fff; box-shadow: 3px 3px 0 var(--hard); }
.btn-danger:hover:not(:disabled) { background: #ab321a; }
.btn-big { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn-wide { width: 100%; }
.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { text-decoration-color: currentColor; }

/* ---------- forms ---------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-label { display: flex; align-items: center; font-size: 14.5px; font-weight: 650; }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--field);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); font-weight: 450; }
.field input:focus, .field textarea:focus { border-color: var(--edge); box-shadow: 0 0 0 3px var(--yellow); }
.field-hint { font-size: 13.5px; color: var(--ink-3); }
.form-error { padding: 10px 12px; border: 1.5px solid var(--red); border-radius: 10px; background: var(--red-soft); color: var(--ink); font-size: 14.5px; }
.form-aside { margin-top: -8px; font-size: 14.5px; text-align: right; }
.fine { font-size: 13.5px; color: var(--ink-3); text-align: center; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 50px; }
.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.reveal svg { width: 20px; height: 20px; }
.reveal:hover, .reveal.on { background: var(--paper-2); color: var(--ink); }
.num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- containers ---------- */

.sheet { background: var(--card); border: 1.5px solid var(--edge); border-radius: 16px; box-shadow: 5px 5px 0 var(--hard); }
.notice { padding: 12px 14px; border: 1.5px solid; border-radius: 12px; font-size: 15px; }
.notice.warn { background: var(--red-soft); border-color: var(--red); }
.notice.ok { background: var(--green-soft); border-color: var(--green); }
.notice.info { background: var(--yellow-soft); border-color: var(--edge); }

/* ---------- top bars & footer ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 18px 20px; }
.topbar.wide { max-width: 1080px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -0.035em; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand.small { font-size: 16px; }
.brand.small svg { width: 24px; height: 24px; }
.site-links { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.nav-link:hover { background: var(--paper-2); color: var(--ink); }

.menu { position: relative; }
.menu > summary {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--edge);
  border-radius: 50%;
  background: var(--card);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--yellow); color: var(--on-yellow); }
.menu-panel { position: absolute; top: 50px; right: 0; z-index: 30; width: 260px; padding: 8px; }
.menu-head { display: grid; gap: 2px; margin-bottom: 6px; padding: 8px 10px 12px; border-bottom: 1.5px dashed var(--line); font-size: 14px; overflow-wrap: anywhere; }
.menu-item { display: block; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--paper-2); }

.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; max-width: 1080px; margin: 0 auto; padding: 28px 24px 48px; border-top: 1.5px dashed var(--line); color: var(--ink-3); font-size: 14px; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: var(--ink-2); }
.site-footer p { flex-basis: 100%; }

.demo-note { max-width: 760px; margin: 0 auto 6px; padding: 0 20px; }
.demo-note.wide { max-width: 1080px; }
.demo-note p { padding: 9px 12px; border: 1.5px dashed var(--edge); border-radius: 10px; background: var(--yellow-soft); font-size: 14px; }

#offline {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--red);
  background: var(--red-soft);
  font-size: 14.5px;
  text-align: center;
}
#offline code, .code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  font: 600 0.92em ui-monospace, 'Cascadia Code', Consolas, monospace;
}

/* ---------- landing page ---------- */

.landing { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; padding: 36px 0 88px; }
.hero .display { margin: 16px 0 0; font-size: clamp(42px, 6vw, 70px); }
.hero .lead { max-width: 31em; margin: 22px 0 30px; font-size: 19px; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.hero-note svg { color: var(--green); }
.hero-mock { position: relative; }
.mock-planner { padding: 18px; transform: rotate(1.2deg); }
.mock-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 12px; }
.mock-head strong { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.mock-planner .row { padding: 12px 14px 12px 10px; cursor: default; }
.mock-planner .row:hover { background: none; }
.mock-note {
  position: absolute;
  bottom: -30px;
  left: -26px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  transform: rotate(-5deg);
  border: 1.5px solid #1d1b16;
  border-radius: 6px;
  background: var(--yellow);
  color: #1d1b16;
  box-shadow: 3px 3px 0 #1d1b16;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}
.mock-note svg { width: 26px; height: 26px; color: #c43d22; }
.mock-note b { display: block; font-size: 16px; font-weight: 800; }
.tag-swap { display: inline-grid; }
.tag-swap > * { grid-area: 1 / 1; justify-self: end; }
.tag-swap .busy { animation: swap-out 6s infinite; }
.tag-swap .review { animation: swap-in 6s infinite; }
@keyframes swap-out { 0%, 44% { opacity: 1; } 50%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes swap-in { 0%, 44% { opacity: 0; transform: scale(0.9); } 50%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.band { padding: 56px 0; border-top: 1.5px dashed var(--line); }
.band-title { max-width: 18em; margin: 8px 0 28px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.how li { padding: 24px; }
.how-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border: 1.5px solid var(--edge);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--on-yellow);
  font-size: 17px;
  font-weight: 800;
}
.how h3 { margin-bottom: 8px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.how p { color: var(--ink-2); }
.band-head { margin-bottom: 30px; }
.band-head .band-title { margin-bottom: 10px; }
.band-lead { max-width: 34em; color: var(--ink-2); font-size: 18px; }
.band-head.centered { text-align: center; }
.band-head.centered .band-title, .band-head.centered .band-lead { margin-left: auto; margin-right: auto; }

/* Feature cards: one colour per card, a duotone icon on a soft tile of that colour. */
.tone-sun { --tone: #b07d00; --tone-soft: #fff1c2; }
.tone-sky { --tone: #2f62b8; --tone-soft: #dfe9fb; }
.tone-leaf { --tone: #2b7a52; --tone-soft: #dcf0e3; }
.tone-plum { --tone: #7c4aa8; --tone-soft: #ece2f7; }
.tone-coral { --tone: #c4492c; --tone-soft: #fbe2d8; }
.tone-sand { --tone: #8a6a3a; --tone-soft: #f1e6d2; }
@media (prefers-color-scheme: dark) {
  .tone-sun { --tone: #ffd23f; --tone-soft: #3a3116; }
  .tone-sky { --tone: #8fb4ff; --tone-soft: #1c2740; }
  .tone-leaf { --tone: #7ccfa2; --tone-soft: #1a2f24; }
  .tone-plum { --tone: #c9a2f0; --tone-soft: #2c2140; }
  .tone-coral { --tone: #ff8f70; --tone-soft: #3a1f17; }
  .tone-sand { --tone: #e0bf8a; --tone-soft: #332a1c; }
}
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.feature {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.feature:hover { border-color: var(--edge); box-shadow: 4px 4px 0 var(--hard); transform: translate(-2px, -2px); }
.feature-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px; background: var(--tone-soft); color: var(--tone); }
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.feature p { flex: 1; color: var(--ink-2); font-size: 15.5px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.feature-tags span { padding: 3px 10px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.in-charge { display: flex; gap: 24px; padding: 32px; background: var(--yellow-soft); }
.in-charge-icon svg { width: 48px; height: 48px; color: var(--green); }
.in-charge h2 { margin-bottom: 14px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 16.5px; font-weight: 550; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist svg { flex: none; margin-top: 4px; color: var(--green); }
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq-item { border: 1.5px solid var(--edge); border-radius: 12px; background: var(--card); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-size: 17px; font-weight: 700; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { flex: none; transition: transform 0.15s; }
.faq-item[open] summary svg { transform: rotate(90deg); }
.faq-item p { padding: 0 18px 18px; color: var(--ink-2); }
.cta-band {
  margin: 24px 0 64px;
  padding: 52px 32px;
  border: 1.5px solid var(--edge);
  border-radius: 20px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 6px 6px 0 var(--yellow);
  text-align: center;
}
.cta-band h2 { max-width: 20em; margin: 0 auto 26px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }

/* ---------- onboarding: stepper, auth pages ---------- */

.stepper { display: flex; justify-content: center; gap: 8px; margin: 6px auto 24px; padding: 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; font-weight: 650; white-space: nowrap; }
.stepper li + li::before { content: ''; width: 22px; margin-right: 2px; border-top: 1.5px dashed var(--line); }
.stepper b { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid var(--line); border-radius: 50%; font-size: 13px; }
.stepper b svg { width: 14px !important; height: 14px !important; }
.stepper .current { color: var(--ink); }
.stepper .current b { border-color: var(--hard); background: var(--yellow); color: var(--on-yellow); }
.stepper .done { color: var(--ink-2); }
.stepper .done b { border-color: var(--green); background: var(--green); color: var(--paper); }
.page-wrap > .stepper { justify-content: flex-start; }

.auth-page { max-width: 500px; margin: 0 auto; padding: 12px 20px 72px; }
.auth-card { padding: 32px; }
.auth-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; }
.auth-sub { margin: 8px 0 24px; color: var(--ink-2); }
.switch { margin-top: 20px; color: var(--ink-2); font-size: 15px; text-align: center; }
.guide-open { margin-bottom: 22px; }
.guide-open svg { width: 14px; height: 14px; }

/* ---------- pages ---------- */

.page-wrap { max-width: 760px; margin: 0 auto; padding: 4px 20px 72px; }
.page-wrap.wide { max-width: 1080px; }
.page-wrap > .notice { margin-bottom: 18px; }
.back-link { margin: 0 0 10px -12px; }
.page-title { margin-top: 6px; font-size: clamp(30px, 4.4vw, 42px); font-weight: 800; line-height: 1.05; letter-spacing: -0.04em; }
.page-sub { margin: 8px 0 26px; color: var(--ink-2); font-size: 17px; }
.panel { margin-bottom: 20px; padding: 24px; }
.panel h2 { margin-bottom: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.panel > p { color: var(--ink-2); }
.panel .form { max-width: 420px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.danger-zone { border-color: var(--red); }

.connect-head { margin: 4px 0 26px; }
.connect-head h1 { font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em; }
.connect-head p { margin-top: 10px; color: var(--ink-2); font-size: 18px; }
.connect-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.connect-form { display: grid; gap: 16px; padding: 26px; }
.fineprint { color: var(--ink-3); font-size: 13.5px; }

.legal { max-width: 720px; }
.legal h2 { margin: 28px 0 8px; font-size: 20px; font-weight: 800; }
.legal p, .legal li { color: var(--ink-2); font-size: 16.5px; }
.legal ul { margin: 0; padding-left: 22px; }
.legal li { margin: 4px 0; }

/* ---------- the animated "get your Canvas token" guide ---------- */

.guide { margin: 0; }
.guide-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  container-type: inline-size;
  border: 1.5px solid var(--edge);
  border-radius: 14px;
  background: #f4f5f3;
  box-shadow: 5px 5px 0 var(--hard);
  color: #2d3b45;
  font-family: var(--font-ui);
  line-height: 1.5;
}
.scene { position: absolute; inset: 0; }
.scene.play { animation: scene-in 0.35s ease both; }
@keyframes scene-in { from { opacity: 0; } }

.m-nav { position: absolute; top: 0; bottom: 0; left: 0; z-index: 2; width: 12%; background: #2d3b45; }
.m-logo { position: absolute; top: 3%; left: 30%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #8aa1b1; }
.m-item { position: absolute; left: 0; right: 0; display: grid; justify-items: center; gap: 0.4cqw; padding: 1cqw 0; color: #fff; font-size: 1.2cqw; font-weight: 600; }
.m-item i { width: 3.4cqw; height: 3.4cqw; border: 0.35cqw solid #fff; border-radius: 50%; }
.m-i1 { top: 14%; } .m-i2 { top: 30%; } .m-i3 { top: 46%; } .m-i4 { top: 62%; }
.m-page { position: absolute; top: 0; right: 0; bottom: 0; left: 12%; display: flex; flex-direction: column; gap: 2cqw; overflow: hidden; padding: 4.5cqw 5cqw; }
.m-bar { display: block; flex: none; height: 1.6cqw; border-radius: 1cqw; background: #d6dce0; }
.m-bar.thin { height: 1.1cqw; background: #e1e6e9; }
.m-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin-top: 1cqw; }
.m-cards i { height: 11cqw; border: 0.25cqw solid #e1e5e8; border-radius: 1cqw; background: #fff; }
.m-tray {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12%;
  display: flex;
  flex-direction: column;
  gap: 0.9cqw;
  z-index: 1; /* slides out from behind the nav */
  width: 30%;
  padding: 5cqw 2.5cqw;
  transform: translateX(-115%);
  background: #fff;
  box-shadow: 1cqw 0 3cqw rgba(0, 0, 0, 0.15);
  font-size: 1.7cqw;
}
.m-tray b { margin-bottom: 1.2cqw; font-size: 2.2cqw; }
.m-tray span { padding: 1cqw 1.4cqw; border-radius: 0.8cqw; }
.m-h { font-size: 2.4cqw; font-weight: 800; }
.m-h.small { font-size: 1.9cqw; }
.m-scroll { position: absolute; top: 0; right: 0; left: 0; height: 160%; }
.m-scroll > * { position: absolute; left: 7%; }
.m-btn { display: inline-block; padding: 1.1cqw 2cqw; border: 0.25cqw solid #c7cdd1; border-radius: 0.8cqw; background: #f7f7f7; font-size: 1.7cqw; font-weight: 700; white-space: nowrap; }
.m-primary { border-color: #2b6fb3; background: #2b6fb3; color: #fff; }
.m-dim { position: absolute; inset: 0; background: rgba(30, 38, 44, 0.45); }
.m-modal {
  position: absolute;
  top: 11%;
  left: 24%;
  display: flex;
  flex-direction: column;
  gap: 1.1cqw;
  width: 52%;
  height: 78%;
  padding: 3.5cqw;
  border-radius: 1.4cqw;
  background: #fff;
  box-shadow: 0 2cqw 5cqw rgba(0, 0, 0, 0.3);
}
.m-label { margin-top: 0.8cqw; color: #4a5a66; font-size: 1.5cqw; font-weight: 700; }
.m-input { display: flex; align-items: center; height: 5cqw; flex: none; padding: 0 1.4cqw; border: 0.25cqw solid #c7cdd1; border-radius: 0.8cqw; background: #fff; font-size: 1.8cqw; }
.m-empty { color: #9aa6ae; }
.m-typed { display: inline-block; width: 0; overflow: hidden; font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
.m-caret { display: inline-block; width: 0.25cqw; height: 2.4cqw; margin-left: 0.2cqw; background: #2d3b45; animation: blink 0.8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.m-generate { align-self: flex-end; margin-top: auto; }
.m-details { top: 10%; left: 16%; width: 68%; height: auto; }
.m-token { align-self: flex-start; padding: 0.6cqw 0.8cqw; border-radius: 0.6cqw; font-family: ui-monospace, Consolas, monospace; font-size: 1.9cqw; }
.m-copied { position: absolute; top: 56%; left: 46%; padding: 0.6cqw 1.3cqw; border-radius: 99px; background: #1d1b16; color: #fff; font-size: 1.5cqw; font-weight: 700; opacity: 0; }
.m-app {
  position: absolute;
  top: 56%;
  left: 16%;
  display: flex;
  flex-direction: column;
  gap: 0.8cqw;
  width: 68%;
  padding: 2.4cqw 3cqw;
  border: 0.3cqw solid #1d1b16;
  border-radius: 1.4cqw;
  background: #fffcf5;
  box-shadow: 0.6cqw 0.6cqw 0 #1d1b16;
  color: #1d1b16;
  opacity: 0;
}
.m-app-brand { display: flex; align-items: center; gap: 0.8cqw; font-size: 1.9cqw; font-weight: 800; }
.m-app-brand svg { width: 3cqw; height: 3cqw; }
.m-app .m-label { margin: 0; color: #1d1b16; }
.m-app-input { border-color: #1d1b16; }
.m-dots { display: inline-block; width: 0; overflow: hidden; letter-spacing: 0.2cqw; white-space: nowrap; }
.m-ok { position: absolute; right: 5%; bottom: 16%; display: grid; place-items: center; width: 4.2cqw; height: 4.2cqw; transform: scale(0); border-radius: 50%; background: #2b6a4d; color: #fff; }
.m-ok svg { width: 60% !important; height: 60% !important; }
.m-cursor { position: absolute; top: 76%; left: 70%; z-index: 5; width: 3.2cqw; height: auto; transform-origin: 10% 5%; filter: drop-shadow(0 0.3cqw 0.4cqw rgba(0, 0, 0, 0.3)); }
.m-ripple { position: absolute; z-index: 4; width: 5cqw; height: 5cqw; margin: -2.5cqw 0 0 -2.5cqw; border: 0.5cqw solid #ffd23f; border-radius: 50%; opacity: 0; pointer-events: none; }
@keyframes ripple { 0% { opacity: 0.95; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.8); } }

/* Scene 1: Account → Settings */
.s1 .r1 { top: 19%; left: 6%; }
.s1 .r2 { top: 29%; left: 22%; }
.play.s1 .m-cursor { animation: s1-cursor 4.2s ease-in-out both; }
.play.s1 .m-tray { animation: s1-tray 4.2s ease both; }
.play.s1 .m-i1 { animation: s1-account 4.2s both; }
.play.s1 .m-settings { animation: s1-settings 4.2s both; }
.play.s1 .r1 { animation: ripple 0.7s ease-out 1.15s both; }
.play.s1 .r2 { animation: ripple 0.7s ease-out 2.45s both; }
@keyframes s1-cursor {
  0% { top: 76%; left: 70%; transform: scale(1); }
  24% { top: 19%; left: 6%; transform: scale(1); }
  28% { transform: scale(0.82); }
  32% { top: 19%; left: 6%; transform: scale(1); }
  52% { top: 29%; left: 22%; transform: scale(1); }
  58% { transform: scale(0.82); }
  62%, 100% { top: 29%; left: 22%; transform: scale(1); }
}
@keyframes s1-tray { 0%, 29% { transform: translateX(-115%); } 40%, 100% { transform: translateX(0); } }
@keyframes s1-account { 0%, 27% { background: transparent; } 30%, 100% { background: rgba(255, 210, 63, 0.3); } }
@keyframes s1-settings { 0%, 57% { background: transparent; } 60%, 100% { background: #ffd23f; color: #1d1b16; } }

/* Scene 2: scroll to Approved Integrations, click + New Access Token */
.s2 .r3 { top: 71%; left: 28%; }
.play.s2 .m-scroll { animation: s2-scroll 4.2s ease-in-out both; }
.play.s2 .m-cursor { animation: s2-cursor 4.2s ease-in-out both; }
.play.s2 .m-ai { animation: s2-heading 4.2s both; }
.play.s2 .m-new { animation: s2-press 4.2s both; }
.play.s2 .r3 { animation: ripple 0.7s ease-out 2.85s both; }
@keyframes s2-scroll { 0%, 10% { transform: translateY(0); } 38%, 100% { transform: translateY(-25%); } }
@keyframes s2-cursor {
  0%, 36% { top: 42%; left: 82%; transform: scale(1); }
  62% { top: 70%; left: 27%; transform: scale(1); }
  68% { transform: scale(0.82); }
  72%, 100% { top: 70%; left: 27%; transform: scale(1); }
}
@keyframes s2-heading { 0%, 38% { box-shadow: inset 0 -0.9cqw 0 transparent; } 46%, 100% { box-shadow: inset 0 -0.9cqw 0 #ffd23f; } }
@keyframes s2-press { 0%, 67% { background: #f7f7f7; } 70%, 100% { border-color: #1d1b16; background: #ffd23f; color: #1d1b16; } }

/* Scene 3: type the purpose, click Generate Token */
.s3 .r4 { top: 35%; left: 40%; }
.s3 .r5 { top: 79%; left: 63%; }
.play.s3 .m-cursor { animation: s3-cursor 4.2s ease-in-out both; }
.play.s3 .m-typed { animation: s3-type 4.2s steps(9, end) both; }
.play.s3 .m-generate { animation: s3-press 4.2s both; }
.play.s3 .r4 { animation: ripple 0.7s ease-out 0.8s both; }
.play.s3 .r5 { animation: ripple 0.7s ease-out 3.2s both; }
@keyframes s3-cursor {
  0% { top: 90%; left: 80%; transform: scale(1); }
  16% { top: 35%; left: 40%; transform: scale(1); }
  20% { transform: scale(0.82); }
  24%, 54% { top: 35%; left: 40%; transform: scale(1); }
  70% { top: 79%; left: 63%; transform: scale(1); }
  76% { transform: scale(0.82); }
  80%, 100% { top: 79%; left: 63%; transform: scale(1); }
}
@keyframes s3-type { 0%, 24% { width: 0; } 52%, 100% { width: 9ch; } }
@keyframes s3-press { 0%, 75% { box-shadow: none; } 78%, 100% { box-shadow: 0 0 0 0.5cqw #ffd23f; } }

/* Scene 4: copy the token, paste it into SortMySem */
.s4 .r6 { top: 75%; left: 40%; }
.play.s4 .m-cursor { animation: s4-cursor 4.2s ease-in-out both; }
.play.s4 .m-token { animation: s4-select 4.2s both; }
.play.s4 .m-copied { animation: s4-copied 4.2s both; }
.play.s4 .m-app { animation: s4-app 4.2s ease both; }
.play.s4 .m-dots { animation: s4-dots 4.2s steps(12, end) both; }
.play.s4 .m-ok { animation: s4-ok 4.2s ease both; }
.play.s4 .r6 { animation: ripple 0.7s ease-out 2.6s both; }
@keyframes s4-cursor {
  0% { top: 20%; left: 82%; transform: scale(1); }
  14% { top: 33%; left: 20%; transform: scale(1); }
  30% { top: 33%; left: 42%; transform: scale(1); }
  36% { transform: scale(0.82); }
  40% { top: 33%; left: 42%; transform: scale(1); }
  60% { top: 75%; left: 40%; transform: scale(1); }
  64% { transform: scale(0.82); }
  68%, 100% { top: 75%; left: 40%; transform: scale(1); }
}
@keyframes s4-select { 0%, 14% { background: transparent; } 30%, 100% { background: #ffd23f; } }
@keyframes s4-copied { 0%, 34% { opacity: 0; transform: translateY(20%); } 40%, 100% { opacity: 1; transform: none; } }
@keyframes s4-app { 0%, 40% { opacity: 0; transform: translateY(12%); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes s4-dots { 0%, 66% { width: 0; } 82%, 100% { width: 100%; } }
@keyframes s4-ok { 0%, 84% { transform: scale(0); } 92%, 100% { transform: scale(1); } }

.guide-bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.guide-num { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1.5px solid var(--edge); border-radius: 50%; background: var(--yellow); color: var(--on-yellow); font-weight: 800; }
.guide-caption { flex: 1; font-size: 16.5px; font-weight: 550; line-height: 1.35; }
.guide-caption b { font-weight: 800; }
.guide-controls { display: flex; align-items: center; gap: 2px; }
.guide-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--field) 4.5px, transparent 5.5px);
  cursor: pointer;
}
.guide.frozen .scene, .guide.frozen .scene * { animation-play-state: paused !important; }
.guide-dot[aria-current='step'] { background: radial-gradient(circle, var(--ink) 5px, transparent 6px); }
.guide-toggle { display: grid; place-items: center; width: 34px; height: 34px; margin-left: 6px; border: 1.5px solid var(--field); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; }
.guide-toggle svg { width: 14px; height: 14px; }

/* ---------- today ---------- */

.today { padding: 22px 0 6px; }
.today .kicker { color: var(--red); }
.today h1 { margin-top: 6px; font-size: clamp(38px, 6.4vw, 58px); font-weight: 800; line-height: 1; letter-spacing: -0.045em; }
.today p { margin-top: 12px; color: var(--ink-2); font-size: 18.5px; }

.strip { margin: 24px 0 34px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--ink-2); font-size: 15px; }
.strip-row { display: flex; align-items: center; gap: 10px; }
.strip-row > svg { width: 20px; height: 20px; flex: none; color: var(--red); }
.strip-text { flex: 1; min-width: 0; }
.strip.busy { border-style: solid; border-color: var(--edge); background: var(--card); color: var(--ink); }
.strip.problem { border-style: solid; border-color: var(--red); background: var(--red-soft); color: var(--ink); }
.bar { height: 8px; margin-top: 12px; overflow: hidden; border: 1.5px solid var(--edge); border-radius: 99px; background: var(--paper); }
.bar span { display: block; height: 100%; background: var(--yellow); transition: width 0.5s ease; }
.bar.unknown span { width: 30%; animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

.section { margin-bottom: 32px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  list-style: none;
}
.section-head::after { content: ''; flex: 1; border-top: 1.5px dashed var(--line); }
.section-head::-webkit-details-marker { display: none; }
.section-note { margin: -4px 0 12px; color: var(--ink-3); font-size: 14px; }
.count { padding: 2px 8px; border: 1.5px solid var(--line); border-radius: 99px; font-size: 12px; letter-spacing: 0; }
details.section > summary { cursor: pointer; }
details.section > summary .chev { transition: transform 0.15s; }
details.section[open] > summary .chev { transform: rotate(90deg); }

.cards { margin: 0; padding: 0; overflow: hidden; border: 1.5px solid var(--edge); border-radius: 14px; background: var(--card); list-style: none; }
.cards > li { position: relative; }
.cards > li + li { border-top: 1.5px dashed var(--line); }
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px 14px 12px;
  color: var(--ink);
  text-decoration: none;
}
.row:hover { background: var(--paper-2); }
.row.has-x { padding-right: 52px; }
.date { display: grid; justify-items: center; padding-right: 12px; border-right: 1.5px solid var(--line); line-height: 1.1; }
.date .dow { color: var(--ink-3); font-size: 11.5px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.date .day { font-size: 27px; font-weight: 800; letter-spacing: -0.04em; }
.date .time { color: var(--ink-3); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.date.soon .dow, .date.soon .day { color: var(--red); }
.row-main { display: grid; gap: 3px; min-width: 0; }
.course { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.course::before { content: ''; flex: none; width: 10px; height: 10px; border: 1.5px solid var(--edge); border-radius: 3px; background: var(--course, var(--yellow)); }
.row-title { font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -0.012em; overflow-wrap: anywhere; }
.row-meta { color: var(--ink-3); font-size: 14px; }
.row-meta.why { color: var(--ink-2); }
.row-side { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.row-side svg { width: 16px; height: 16px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1.5px solid var(--edge); border-radius: 99px; background: var(--card); }
.tag.review { border-color: var(--hard); background: var(--yellow); color: var(--on-yellow); }
.tag.busy { border-style: dashed; color: var(--ink-2); }
.tag.busy .spinner { width: 11px; height: 11px; }
.tag.later { border-style: dashed; border-color: var(--line); color: var(--ink-2); }
.tag.problem { border-color: var(--red); color: var(--red); }
.tag.done { border-color: var(--green); color: var(--green); }
.tag.canvas { border-color: var(--line); color: var(--ink-2); }
.row-x {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.row-x:hover { background: var(--paper-2); color: var(--ink); }
@media (hover: hover) {
  .row-x { opacity: 0; transition: opacity 0.12s; }
  .cards > li:hover .row-x, .row-x:focus-visible { opacity: 1; }
}

.empty { padding: 44px 24px; border: 1.5px dashed var(--line); border-radius: 16px; text-align: center; }
.empty h2 { margin: 18px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.empty p { max-width: 26em; margin: 0 auto; color: var(--ink-2); }
.stamp {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  transform: rotate(-10deg);
  border: 2.5px solid var(--green);
  border-radius: 50%;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--line) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-row { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px 18px 16px 12px; }
.skeleton-row + .skeleton-row { border-top: 1.5px dashed var(--line); }
.skeleton-lines { display: grid; gap: 9px; }
.footnote { margin-top: 40px; color: var(--ink-3); font-size: 13.5px; text-align: center; }

/* ---------- review ---------- */

.review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 860px; margin: 0 auto; padding: 16px 20px; }
.review-page { max-width: 860px; margin: 0 auto; padding: 0 20px 40px; }
.review-head { margin: 6px 0 22px; }
.review-head h1 { margin: 10px 0 8px; font-size: clamp(28px, 4.4vw, 42px); font-weight: 800; line-height: 1.04; letter-spacing: -0.04em; }
.review-head p { color: var(--ink-2); font-size: 16px; }
.review-page > .notice, .review-page > .sticky, .review-page > .instructions { margin-bottom: 16px; }

.sticky { padding: 14px 18px; border: 1.5px solid var(--edge); border-radius: 12px; background: var(--yellow-soft); box-shadow: 3px 3px 0 var(--hard); }
.sticky h2 { margin-bottom: 6px; font-size: 12.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.sticky ul { margin: 0; padding-left: 20px; }
.sticky li { margin: 3px 0; }

.instructions { border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.instructions > summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-weight: 650; list-style: none; cursor: pointer; }
.instructions > summary::-webkit-details-marker { display: none; }
.instructions > summary::after { content: 'Show'; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.instructions[open] > summary::after { content: 'Hide'; }
.rich { padding: 0 18px 18px; font-family: var(--font-read); font-size: 17.5px; line-height: 1.6; overflow-wrap: anywhere; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich table { border-collapse: collapse; }
.rich td, .rich th { padding: 4px 8px; border: 1px solid var(--line); }

.page {
  position: relative;
  min-height: 360px;
  margin: 8px 0 12px;
  padding: 48px 56px 56px 88px;
  border: 1.5px solid var(--edge);
  border-radius: 6px;
  background: var(--card);
  box-shadow: 5px 5px 0 var(--hard);
  font-family: var(--font-read);
  font-size: 19px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  outline: none;
}
/* the red margin line of a notebook page */
.page::before { content: ''; position: absolute; top: 0; bottom: 0; left: 58px; border-left: 1.5px solid var(--red); opacity: 0.55; pointer-events: none; }
.page[contenteditable='true']:focus { box-shadow: 5px 5px 0 var(--hard), 0 0 0 4px var(--yellow); }
.page h1, .page h2, .page h3 { margin: 1.3em 0 0.45em; font-family: var(--font-ui); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
.page h1 { font-size: 1.45em; }
.page h2 { font-size: 1.2em; }
.page h3 { font-size: 1.05em; }
.page > :first-child { margin-top: 0; }
.page p { margin: 0 0 0.95em; }
.page ul, .page ol { margin: 0 0 0.95em; padding-left: 1.35em; }
.page li { margin: 0.25em 0; }
.page blockquote { margin: 0 0 0.95em; padding-left: 1em; border-left: 3px solid var(--line); color: var(--ink-2); font-style: italic; }
.page table { margin: 0 0 1em; border-collapse: collapse; }
.page td, .page th { padding: 4px 8px; border: 1px solid var(--line); }
.page code { padding: 1px 5px; border-radius: 4px; background: var(--paper-2); font-size: 0.85em; }
.page pre, .rich pre { margin: 0 0 1em; padding: 12px 14px; overflow-x: auto; border-radius: 8px; background: var(--paper-2); font-size: 0.8em; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.page pre code { padding: 0; background: none; font-size: inherit; }
.page.writing { display: grid; align-content: start; gap: 14px; }
.page.writing .status { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-family: var(--font-ui); font-size: 16px; font-weight: 650; }
.page-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; color: var(--ink-3); font-size: 14px; }
.saved { color: var(--green); }
.manual { padding: 32px; text-align: center; }
.manual p { max-width: 28em; margin: 0 auto 20px; color: var(--ink-2); font-size: 17px; }

.actionbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 860px; margin: 0 auto; padding: 12px 20px; }
.actionbar .left { display: flex; flex-wrap: wrap; gap: 2px; }

/* ---------- dialog & toasts ---------- */

dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 1.5px solid var(--edge);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--hard);
}
dialog:has(.wide) { width: min(720px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(23, 21, 15, 0.45); }
.dialog-body { padding: 26px 26px 6px; }
.dialog-body h2 { margin-bottom: 8px; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.dialog-body > p { margin-bottom: 14px; color: var(--ink-2); }
.dialog-body .guide { margin-top: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 26px 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip { padding: 7px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--edge); background: var(--yellow-soft); }

body.has-actionbar #toasts { bottom: 92px; }
#toasts { position: fixed; bottom: 24px; left: 50%; z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); transform: translateX(-50%); pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
  font-size: 15px;
  font-weight: 550;
  pointer-events: auto;
  animation: rise 0.18s ease-out;
}
.toast.error { border-color: #8f2a14; background: #b3361a; color: #fff; }
.toast.ok { border-color: #1d4a35; background: #245c43; color: #fff; }
.toast button { border: 0; background: none; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 16px; }
  .hero-mock { max-width: 560px; margin: 0 16px 0 26px; }
  .how { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .connect-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav-link { display: none; }
  .site-links .btn { min-height: 40px; padding: 0 12px; font-size: 14.5px; }
  .site-links .btn-plain { padding: 0 8px; }
  .in-charge { flex-direction: column; gap: 12px; padding: 24px; }
  .cta-band { padding: 40px 22px; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .band-lead { font-size: 16.5px; }
  .landing { padding: 0 18px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-mock { margin: 0 4px 0 10px; }
  .mock-note { left: -8px; }
  .mock-planner { padding: 12px; }
  .mock-head .kicker { display: none; }
  .topbar { padding: 14px 16px; }
  .brand { font-size: 19px; }
  .brand svg { width: 30px; height: 30px; }
  .auth-card, .connect-form, .panel { padding: 22px 18px; }
  .row { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; padding-right: 14px; }
  .row.has-x { padding-right: 46px; }
  .row-x { right: 6px; }
  .row-side .tag-text { display: none; }
  .row-side .tag { padding: 7px; }
  .date { padding-right: 8px; }
  .date .day { font-size: 23px; }
  .page { padding: 28px 20px 36px 40px; font-size: 18px; }
  .page::before { left: 24px; }
  .actionbar .btn-plain { padding: 0 9px; }
  .actionbar .btn-plain .label { display: none; }
  .strip-row { flex-wrap: wrap; }
  .stepper li:not(.current) span { display: none; }
  .stepper, .stepper li { gap: 6px; }
  .stepper li + li::before { width: 14px; }
  .guide-bar { flex-wrap: wrap; }
  .guide-caption { flex-basis: calc(100% - 46px); }
  .guide-controls { margin-left: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .tag-swap .busy { display: none; }
}

/* ---------- onboarding choices, plans, picking, downloads ---------- */

.page-wrap.onboarding { max-width: 760px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 22px;
  border: 1.5px solid var(--field);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s;
}
.choice:hover .choice-body { border-color: var(--edge); }
.choice input:checked + .choice-body { border-color: var(--hard); background: var(--yellow-soft); box-shadow: 4px 4px 0 var(--hard); }
.choice input:focus-visible + .choice-body { outline: 2.5px solid var(--ink); outline-offset: 3px; }
.choice-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid var(--edge); border-radius: 12px; background: var(--card); }
.choice-icon svg { width: 22px; height: 22px; }
.choice input:checked + .choice-body .choice-icon { background: var(--yellow); color: var(--on-yellow); }
.choice-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.choice-text { color: var(--ink-2); }
.wide-form { max-width: none !important; }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border: 1.5px solid var(--hard); border-radius: 99px; background: var(--yellow); color: var(--on-yellow); font-size: 12px; font-weight: 750; letter-spacing: 0.02em; white-space: nowrap; }
.badge.soft { border-color: var(--line); background: var(--paper-2); color: var(--ink-2); }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 760px; }
.pricing .plan-grid { margin: 0 auto; }
.plan-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.plan-card.featured { background: var(--yellow-soft); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.plan-price span { color: var(--ink-2); font-size: 17px; font-weight: 600; }
.plan-fine { min-height: 3em; color: var(--ink-2); font-size: 15px; }
.checklist.small { margin-bottom: 6px; font-size: 15px; }
.plan-card .btn { margin-top: auto; }
.pricing-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; color: var(--ink-3); font-size: 14px; text-align: center; }
.pricing-note svg { width: 16px; height: 16px; color: var(--green); }
.page-wrap > .notice .spinner { margin-right: 6px; vertical-align: -2px; }

.menu-plan { display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin-top: 8px; padding: 3px 10px; border-radius: 99px; background: var(--yellow-soft); color: var(--ink); font-size: 13px; font-weight: 650; text-decoration: none; }
.menu-plan svg { width: 14px; height: 14px; }
.menu-plan.warn { background: var(--red-soft); }
.plan-panel { background: var(--yellow-soft); }
.plan-panel.warn { background: var(--red-soft); }
.plan-panel-title { margin-bottom: 6px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.trial-meter { height: 8px; margin: 10px 0 12px; overflow: hidden; border: 1.5px solid var(--edge); border-radius: 99px; background: var(--card); }
.trial-meter span { display: block; min-width: 8px; height: 100%; background: var(--yellow); }

.row.pick { grid-template-columns: 64px minmax(0, 1fr) auto; cursor: pointer; }
.row.pick.picked { background: var(--yellow-soft); }
.row-open { color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.pick-box { width: 22px; height: 22px; margin: 0 0 0 6px; accent-color: var(--ink); cursor: pointer; }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 12px; }
.pick-bar .btn svg { width: 16px; height: 16px; }

.format-list { display: grid; gap: 8px; margin-top: 4px; }
.format {
  display: grid;
  grid-template-columns: 62px 1fr;
  grid-template-areas: 'ext name' 'ext note';
  align-items: center;
  column-gap: 12px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.format:hover { border-color: var(--edge); background: var(--paper-2); }
.format.fits { border-color: var(--hard); background: var(--yellow-soft); }
.format-ext { grid-area: ext; display: grid; place-items: center; height: 40px; border: 1.5px solid var(--edge); border-radius: 8px; background: var(--paper); font: 700 13px ui-monospace, Consolas, monospace; }
.format-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.format-note { grid-area: note; color: var(--ink-3); font-size: 13.5px; }

@media (max-width: 700px) {
  .choice-grid, .plan-grid { grid-template-columns: 1fr; }
  .row.pick { grid-template-columns: 50px minmax(0, 1fr) auto; }

}
