/* Components from the approved style guide (Notebook, Sep 2026). */

/* ---------- Buttons ---------- */
.btn { position: relative; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border-radius: var(--r-button); font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; -webkit-tap-highlight-color: transparent; transition: transform var(--t-press) var(--ease), box-shadow var(--t-press) var(--ease), background-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--forest); color: var(--parchment-50); border-color: var(--forest-deep); box-shadow: var(--shadow-press); }
.btn-primary:hover, .btn-primary.is-hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--forest-deep); }
.btn-primary:active, .btn-primary.is-active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--forest-deep); }
.btn-secondary { background: var(--parchment-50); color: var(--forest); border-color: var(--forest); box-shadow: var(--shadow-press-soft); }
.btn-secondary:hover, .btn-secondary.is-hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--stone); }
.btn-secondary:active, .btn-secondary.is-active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--stone); }
.btn-light { background: var(--parchment-50); color: var(--forest); border-color: var(--forest-night); box-shadow: 4px 4px 0 var(--forest-night); }
.btn-light:hover, .btn-light.is-hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--forest-night); }
.btn-light:active, .btn-light.is-active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--forest-night); }
.btn-danger { background: var(--russet); color: var(--parchment-50); border-color: var(--russet-deep); box-shadow: 4px 4px 0 var(--russet-deep); }
.btn-danger:hover, .btn-danger.is-hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--russet-deep); }
.btn-danger:active, .btn-danger.is-active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--russet-deep); }
/* Focus ring: drawn round the button AND its offset shadow, 3px clear of both */
.btn:focus-visible, .btn.is-focus { outline: none; }
.btn:focus-visible::after, .btn.is-focus::after { content: ""; position: absolute; inset: -7px -11px -11px -7px; border: 2.5px solid var(--clay-ink); border-radius: calc(var(--r-button) + 6px); pointer-events: none; }
.btn-text:focus-visible::after, .btn-text.is-focus::after, .btn:disabled::after { inset: -5px; border-radius: 12px; }
.btn:disabled, .btn.is-disabled { background: var(--parchment-100); color: var(--ash-400); border: 1.5px dashed var(--ash-400); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.is-loading { cursor: progress; }
.btn .spin { display: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; animation: spin 900ms linear infinite; }
.btn.is-loading .spin { display: block; }
.btn.is-loading .ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: 14px; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-text { background: none; border: 0; box-shadow: none; color: var(--forest); padding-inline: 6px; text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn-text:hover, .btn-text.is-hover { text-decoration-style: wavy; text-decoration-color: var(--clay-ink); }
.btn-icon { width: 48px; padding: 0; }
.btn-icon[aria-pressed="true"] svg { fill: var(--clay); color: var(--clay-ink); }
.btn-block { width: 100%; min-height: 52px; font-size: 16px; white-space: normal; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.label { font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.35; }
.hint { font-size: 14px; color: var(--ash-600); line-height: 1.45; }
.input { width: 100%; min-height: 48px; padding: 11px 14px; font-size: 16px; line-height: 1.4; background: var(--parchment-50); color: var(--ink); border: 1.5px solid var(--ash-400); border-radius: var(--r-input); transition: border-color var(--t-hover) var(--ease); }
.input::placeholder { color: var(--ash-400); opacity: 1; }
.input:hover, .input.is-hover { border-color: var(--forest); }
.input:focus-visible, .input.is-focus { outline: 3px solid var(--clay-ink); outline-offset: 2px; border-color: var(--forest); }
.input[aria-invalid="true"], .input.is-error { border: 2px solid var(--russet); padding: 10.5px 13.5px; }
.input:disabled { background: var(--parchment); border-style: dashed; color: var(--ash-400); cursor: not-allowed; }
textarea.input { min-height: 132px; resize: vertical; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select svg { position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--forest); pointer-events: none; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--ash-600); pointer-events: none; }
.search .input { padding-left: 44px; }
.err, .ok { display: grid; grid-template-columns: auto 1fr; gap: 7px; align-items: start; font-size: 14px; font-weight: 500; line-height: 1.45; }
.err { color: var(--russet); }
.ok { color: var(--forest); }
.err svg, .ok svg { width: 17px; height: 17px; margin-top: 1px; }
.ok svg { color: var(--moss); }
.count { font-size: 13px; color: var(--ash-600); justify-self: end; font-variant-numeric: tabular-nums; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.inline-form .field { flex: 1 1 260px; }
.inline-form .btn { margin-top: 27px; }
.choice { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 16px; line-height: 1.35; position: relative; }
.choice input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; left: 0; top: 50%; transform: translateY(-50%); }
.choice .box { width: 24px; height: 24px; flex: none; border: 1.5px solid var(--ash-400); background: var(--parchment-50); display: grid; place-items: center; transition: background-color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease); }
.choice:hover .box { border-color: var(--forest); }
.choice input:focus-visible + .box { outline: 3px solid var(--clay-ink); outline-offset: 2px; }
.choice input:disabled + .box { border-style: dashed; background: var(--parchment); }
.choice input:disabled ~ span:last-child { color: var(--ash-400); }
.check .box { border-radius: 7px; }
.check .box svg { width: 16px; height: 16px; fill: none; stroke: var(--parchment-50); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 260ms var(--ease); }
.check input:checked + .box { background: var(--forest); border-color: var(--forest); }
.check input:checked + .box svg { stroke-dashoffset: 0; }
.radio .box { border-radius: 50%; }
.radio .box::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--parchment-50); transform: scale(0); transition: transform var(--t-hover) var(--ease); }
.radio input:checked + .box { background: var(--forest); border-color: var(--forest); }
.radio input:checked + .box::after { transform: scale(1); }
.choice small { display: block; font-size: 14px; color: var(--ash-600); }
.stack { display: grid; gap: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; width: 100%; max-width: 440px; padding: 8px 0; background: none; border: 0; text-align: left; font-size: 16px; color: var(--ink); }
.switch .track { position: relative; width: 50px; height: 30px; flex: none; border-radius: 999px; background: var(--parchment-100); border: 1.5px solid var(--ash-400); transition: background-color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease); }
.switch .thumb { position: absolute; top: 2.5px; left: 2.5px; width: 22px; height: 22px; border-radius: 50%; background: var(--parchment-50); border: 1.5px solid var(--ash-400); transition: transform var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease); }
.switch[aria-checked="true"] .track { background: var(--forest); border-color: var(--forest); }
.switch[aria-checked="true"] .thumb { transform: translateX(20px); border-color: var(--forest-deep); }
.switch small { display: block; font-size: 14px; color: var(--ash-600); }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--ash-400); background: var(--parchment-50); color: var(--ink); font-size: 14px; font-weight: 500; transition: background-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease); }
.fchip:hover { border-color: var(--forest); }
.fchip svg { width: 16px; height: 16px; display: none; }
.fchip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--parchment-50); }
.fchip[aria-pressed="true"] svg { display: block; }
.fchip:disabled { border-style: dashed; color: var(--ash-400); background: var(--parchment); cursor: not-allowed; }
.seg { display: inline-flex; border: 1.5px solid var(--forest); border-radius: var(--r-button); overflow: hidden; background: var(--parchment-50); box-shadow: 3px 3px 0 var(--stone); }
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: grid; place-items: center; min-width: 76px; min-height: 44px; padding: 0 14px; font-weight: 600; font-size: 15px; color: var(--forest); font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease); }
.seg label + label span { border-left: 1.5px solid var(--forest); }
.seg input:checked + span { background: var(--forest); color: var(--parchment-50); }
.seg input:focus-visible + span { outline: 3px solid var(--clay-ink); outline-offset: -6px; }
.group-label { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; display: block; }

/* ---------- Chips, cards, messages ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; line-height: 1; padding: 7px 11px; border-radius: 999px; background: var(--cb, var(--parchment)); color: var(--cf, var(--ink)); white-space: nowrap; }
.ink-clay { --cb: var(--ink-clay-bg); --cf: var(--ink-clay-fg); }
.ink-butter { --cb: var(--ink-butter-bg); --cf: var(--ink-butter-fg); }
.ink-moss { --cb: var(--ink-moss-bg); --cf: var(--ink-moss-fg); }
.ink-forest { --cb: var(--ink-forest-bg); --cf: var(--ink-forest-fg); }
.ink-russet { --cb: var(--ink-russet-bg); --cf: var(--ink-russet-fg); }
.diff { --cb: transparent; --cf: var(--ash-600); border: 1.5px dashed var(--stone); padding: 5.5px 10px; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ash-400); }
.pips[data-n="1"] i:nth-child(-n+1), .pips[data-n="2"] i:nth-child(-n+2), .pips[data-n="3"] i:nth-child(-n+3), .pips[data-n="4"] i:nth-child(-n+4) { background: var(--forest); border-color: var(--forest); }
.badge-pro { --cb: var(--butter); --cf: var(--ink); }
.badge-free { --cb: transparent; --cf: var(--forest); border: 1.5px solid var(--forest); padding: 5.5px 10px; }
.badge-new { --cb: transparent; --cf: var(--clay-ink); position: relative; padding: 7px 12px; }
.badge-new svg { position: absolute; inset: -3px -4px; width: calc(100% + 8px); height: calc(100% + 6px); fill: none; stroke: var(--clay); stroke-width: 1.8; stroke-linecap: round; overflow: visible; }
.icard { position: relative; z-index: 1; background: var(--parchment-50); border: 1.5px solid var(--forest); border-radius: var(--r-card); box-shadow: 4px 4px 0 var(--parchment-100); display: grid; }
.icard-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 18px 12px; border-bottom: 2px solid var(--clay); }
.icard-body { display: grid; gap: 18px; padding: 16px 18px 20px; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); background-position: 0 8px; }
.icard .prompt { min-height: 2.5em; }
.deck { position: relative; padding: 14px 12px 12px; }
.deck::before, .deck::after { content: ""; position: absolute; inset: 14px 12px 12px; border-radius: var(--r-card); border: 1.5px solid var(--stone); }
.deck::before { background: #F6EBD2; transform: rotate(3deg) translate(8px, 6px); }
.deck::after { background: #F9F0DD; transform: rotate(-2deg) translate(-6px, 4px); z-index: 0; }
.deck .icard { transform: rotate(-0.8deg); box-shadow: var(--shadow-lift); }
.clock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.lights { display: flex; gap: 8px; }
.l { width: 26px; height: 26px; display: block; }
.l svg { width: 26px; height: 26px; display: block; }
[data-light="green"] .l.g, [data-light="amber"] .l.g, [data-light="red"] .l.g { --lf: var(--moss); }
[data-light="amber"] .l.a, [data-light="red"] .l.a { --lf: var(--butter); }
[data-light="red"] .l.r { --lf: var(--russet); }
.state-text { font-size: 15px; color: var(--ash-600); }
.gen-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gen-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.gen-cta { padding-block: 10px; margin-block: -10px; font-size: 15px; font-weight: 600; color: var(--clay-ink); display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.gen-cta:hover { text-decoration-style: wavy; }
.gen-cta svg { width: 18px; height: 18px; }
.panel { background: var(--parchment-50); border: 1.5px solid var(--forest); border-radius: var(--r-panel); box-shadow: var(--shadow-panel); padding: clamp(18px, 3vw, 26px); }
.panel-title { font-family: var(--serif); font-weight: 560; font-size: 22px; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; margin-bottom: 4px; }
.qlist { list-style: none; }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding-block: 16px; }
.qrow + .qrow { border-top: 1.5px dashed var(--stone); }
.qrow .q { font-family: var(--serif); font-weight: 480; font-size: 20px; line-height: 1.3; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.qrow .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.qrow .go { grid-row: 1 / span 2; grid-column: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--forest); text-decoration: none; }
.qrow .go svg { width: 18px; height: 18px; transition: transform var(--t-hover) var(--ease); }
.qrow .go:hover svg { transform: translateX(3px); }
.qrow .go:hover span { text-decoration: underline wavy var(--clay); text-underline-offset: 5px; }
.posts { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .posts { grid-template-columns: 1.1fr 0.9fr; } }
.post { display: grid; gap: 12px; text-decoration: none; color: inherit; }
.post-art { aspect-ratio: 16 / 10; max-width: 100%; border-radius: var(--r-panel); border: 1.5px solid var(--forest); overflow: hidden; background: #F2E4C9; }
.post-art svg { width: 100%; height: 100%; display: block; }
.post h4 { font-family: var(--serif); font-weight: 560; font-size: 24px; line-height: 1.2; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.post:hover h4 { text-decoration: underline wavy var(--clay); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.post .meta { font-size: 14px; color: var(--ash-600); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.post p { font-size: 16px; color: var(--ash-600); }
.post-list { list-style: none; display: grid; }
.post-row { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding-block: 14px; text-decoration: none; color: inherit; }
.post-list li + li .post-row { border-top: 1.5px dashed var(--stone); }
.post-row .thumb { aspect-ratio: 1; border-radius: 12px; border: 1.5px solid var(--forest); overflow: hidden; background: #F2E4C9; }
.post-row .thumb svg { width: 100%; height: 100%; display: block; }
.post-row b { font-family: var(--serif); font-weight: 520; font-size: 18px; line-height: 1.25; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.post-row:hover b { text-decoration: underline wavy var(--clay); text-underline-offset: 5px; }
.post-row span { display: block; font-size: 13px; color: var(--ash-600); margin-top: 4px; }
.fb { display: grid; gap: 12px; }
.fb-hello { font-family: var(--serif); font-weight: 560; font-size: 26px; line-height: 1.15; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: var(--parchment-50); border: 1.5px solid var(--parchment-100); border-radius: 12px; padding: 10px 8px; display: grid; gap: 2px; text-align: center; }
.metric b { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.1; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; font-variant-numeric: tabular-nums lining-nums; }
.metric span { font-size: 12.5px; color: var(--ash-600); line-height: 1.3; }
.tip { background: var(--parchment-50); border: 1.5px solid var(--forest); border-radius: var(--r-card); padding: 14px; display: grid; gap: 6px; box-shadow: 3px 3px 0 var(--parchment-100); }
.tip .k { font-size: 13px; font-weight: 600; color: var(--clay-ink); }
.tip p { font-size: 15px; line-height: 1.5; }
.locked { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-card); border: 1.5px dashed var(--stone); }
.locked .k { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ash-600); }
.locked .k svg { width: 15px; height: 15px; }
.locked .bar { height: 8px; border-radius: 99px; background: var(--parchment-100); }
.notes { display: grid; gap: 12px; }
.note { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--nb); background: var(--nbg); max-width: 60ch; }
.note svg { grid-row: span 2; width: 20px; height: 20px; margin-top: 2px; color: var(--ni); }
.note b { font-size: 15px; font-weight: 600; color: var(--nt); }
.note p { font-size: 15px; color: var(--ink); line-height: 1.5; }
.note.info { --nbg: var(--note-info); --nb: var(--moss); --ni: var(--forest); --nt: var(--forest); }
.note.warn { --nbg: var(--note-warn); --nb: var(--note-warn-edge); --ni: var(--note-warn-ink); --nt: var(--note-warn-ink); }
.note.error { --nbg: var(--note-error); --nb: var(--russet); --ni: var(--russet); --nt: var(--ink-russet-fg); }
.toast { display: inline-flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--forest); color: var(--parchment-50); box-shadow: 4px 4px 0 var(--forest-night); font-size: 15px; font-weight: 500; }
.toast svg { width: 20px; height: 20px; color: var(--sage); }
.toast button { min-height: 36px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid rgba(251, 246, 234, 0.5); background: transparent; color: var(--parchment-50); font-weight: 600; font-size: 14px; }
.toast button:focus-visible { outline-color: var(--butter); }
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 20px; border-radius: var(--r-panel); border: 1.5px dashed var(--stone); max-width: 420px; }
.empty svg.doodle { width: 76px; height: 64px; }
.empty h4 { font-family: var(--serif); font-weight: 560; font-size: 22px; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.empty p { font-size: 15px; color: var(--ash-600); max-width: 34ch; }
.skeleton { display: grid; gap: 10px; max-width: 420px; padding: 18px; border-radius: var(--r-card); border: 1.5px solid var(--parchment-100); background: var(--parchment-50); }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--parchment-100) 0%, var(--parchment) 50%, var(--parchment-100) 100%); background-size: 200% 100%; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Doodles ---------- */
.step-n { position: relative; width: 44px; height: 44px; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--forest); font-variation-settings: "SOFT" 100, "WONK" 1; }
.step-n svg { position: absolute; inset: 0; width: 44px; height: 44px; fill: none; stroke: var(--clay); stroke-width: 2; stroke-linecap: round; }
.arrow-note { display: grid; grid-template-columns: auto auto; align-items: end; gap: 4px; }
.arrow-note span { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 22px; color: var(--clay-ink); font-variation-settings: "SOFT" 100, "WONK" 1; transform: rotate(-4deg); }
.arrow-note svg { width: 70px; height: 56px; fill: none; stroke: var(--clay); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
