/* Postovich components. Every value comes from tokens.css; nothing here declares a colour. */

.pop-panel { width: 400px; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; }
.pop-panel *, .pop-panel *::before, .pop-panel *::after { box-sizing: border-box; }
.pop-panel p { margin: 0; }
.pop-body { padding: var(--space-5) var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-5); }
.pop-sprite { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }

/* Header */
.pop-header { display: flex; align-items: center; gap: var(--space-2); height: 48px; padding: 0 var(--space-4); background: var(--surface-raised); border-bottom: var(--stroke-2) solid var(--line); }
.pop-header .pop-sprite { width: var(--sprite-sm); height: var(--sprite-sm); margin-top: 8px; align-self: flex-end; }
.pop-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 16px; }
.pop-tabs { display: flex; margin-left: auto; height: 100%; }
.pop-tab { display: flex; align-items: center; padding: 0 var(--space-2); font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ink-muted); border-bottom: var(--stroke-2) solid transparent; margin-bottom: calc(-1 * var(--stroke-2)); text-decoration: none; }
.pop-tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Text helpers */
.pop-title { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; margin: 0; }
.pop-step { font-family: var(--font-display); font-size: 16px; line-height: 16px; color: var(--ink-muted); }
.pop-small { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-section { display: flex; flex-direction: column; gap: var(--space-3); }
.pop-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.pop-section__title { font-weight: 700; font-size: 15px; line-height: 22px; }
.pop-rule { height: 0; border: 0; border-top: var(--stroke-2) solid var(--line); margin: 0; }

/* Button */
.pop-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); border: var(--stroke-2) solid var(--line-strong); border-radius: var(--radius-0); background: transparent; color: var(--ink); font: 700 15px/22px var(--font-sans); box-shadow: var(--shadow-block); cursor: pointer; text-decoration: none; }
.pop-btn:active { transform: translate(2px, 2px); box-shadow: var(--shadow-pressed); }
.pop-btn:focus-visible, .pop-input:focus-visible, .pop-chip:focus-visible, .pop-option:focus-within, .pop-stepper button:focus-visible { outline: var(--stroke-2) solid var(--focus); outline-offset: 2px; }
.pop-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pop-btn--ghost { border-color: transparent; box-shadow: none; color: var(--ink-muted); padding: 0 var(--space-2); }
.pop-btn--block { width: 100%; }
.pop-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.pop-actions { display: flex; gap: var(--space-3); }
.pop-actions .pop-btn { flex: 1; }

/* Field */
.pop-field { display: flex; flex-direction: column; gap: var(--space-2); }
.pop-label { font-weight: 700; font-size: 15px; line-height: 22px; }
.pop-input { width: 100%; background: var(--surface-sunken); color: var(--ink); border: var(--stroke-2) solid var(--line-strong); border-radius: var(--radius-0); padding: 9px var(--space-3); font: 400 15px/22px var(--font-sans); }
.pop-input::placeholder { color: var(--ink-muted); }
.pop-input--key { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; letter-spacing: .02em; }
.pop-input--draft { min-height: 200px; resize: vertical; font-size: 16px; line-height: 24px; padding: var(--space-3); }
.pop-field__status { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; color: var(--signal-ok); font-weight: 700; }
.pop-field__status::before { content: ""; width: 8px; height: 8px; background: currentColor; }

/* Chip (content pillars) */
.pop-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pop-chip { appearance: none; display: inline-flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 var(--space-3); border: var(--stroke-2) solid var(--line-strong); border-radius: var(--radius-0); background: transparent; color: var(--ink); font: 700 13px/18px var(--font-sans); cursor: pointer; }
.pop-chip::before { content: ""; width: 8px; height: 8px; border: var(--stroke-2) solid var(--line-strong); }
.pop-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.pop-chip[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); }

/* Option (intensity) */
.pop-options { display: flex; flex-direction: column; gap: var(--space-2); }
.pop-option { display: grid; grid-template-columns: 16px 1fr; column-gap: var(--space-3); align-items: start; padding: var(--space-3); border: var(--stroke-2) solid var(--line-strong); cursor: pointer; }
.pop-option input { appearance: none; margin: 3px 0 0; width: 16px; height: 16px; border: var(--stroke-2) solid var(--line-strong); background: var(--surface-sunken); }
.pop-option input:checked { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface-sunken); }
.pop-option:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.pop-option__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px; }
.pop-option__desc { grid-column: 2; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-option:has(input:checked) .pop-option__desc { color: var(--ink); }

/* Stepper (cadence) */
.pop-stepper { display: flex; align-items: center; gap: var(--space-3); }
.pop-stepper button { appearance: none; width: 40px; height: 40px; border: var(--stroke-2) solid var(--line-strong); background: transparent; color: var(--ink); font: 700 20px/1 var(--font-display); cursor: pointer; box-shadow: var(--shadow-block); }
.pop-stepper__value { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; min-width: 32px; text-align: center; }
.pop-stepper__unit { font-size: 15px; color: var(--ink-muted); }

/* Verdict badge */
.pop-verdict { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--space-3); font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 16px; color: var(--on-signal); background: var(--ink-muted); box-shadow: var(--shadow-block); }
.pop-verdict--starter { background: var(--signal-ok); }
.pop-verdict--rotation { background: var(--accent); color: var(--on-accent); }
.pop-verdict--bench { background: var(--wood); }
.pop-verdict--cut { background: var(--signal-bad); }
.pop-verdict-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pop-scale { display: flex; gap: var(--space-1); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-scale b { color: var(--ink); }

/* Press quote */
.pop-press { display: grid; grid-template-columns: var(--sprite-md) 1fr; gap: var(--space-3); align-items: end; }
.pop-press .pop-sprite { width: var(--sprite-md); height: var(--sprite-md); }
.pop-press--lg { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: var(--space-4); }
.pop-press--lg .pop-sprite { width: var(--sprite-lg); height: var(--sprite-lg); order: 2; }
.pop-bubble { position: relative; background: var(--surface-raised); border: var(--stroke-2) solid var(--line); padding: var(--space-3); box-shadow: var(--shadow-block); margin-bottom: 12px; }
.pop-bubble__quote { font-family: var(--font-display); font-size: 16px; line-height: 24px; color: var(--ink); }
.pop-bubble__by { margin-top: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-press:not(.pop-press--lg) .pop-bubble::after { content: ""; position: absolute; left: -10px; bottom: 8px; width: 8px; height: 8px; background: var(--surface-raised); border-left: var(--stroke-2) solid var(--line); border-bottom: var(--stroke-2) solid var(--line); }
.pop-press--lg .pop-bubble { margin-bottom: 0; }

/* Notes (problem + fix) */
.pop-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pop-note { display: grid; grid-template-columns: 32px 1fr; column-gap: var(--space-2); padding: var(--space-3) 0; border-top: var(--stroke-1) solid var(--line); }
.pop-note:last-child { border-bottom: var(--stroke-1) solid var(--line); }
.pop-note__num { font-family: var(--font-display); font-size: 16px; line-height: 22px; color: var(--ink-muted); }
.pop-note__body { display: flex; flex-direction: column; gap: var(--space-2); }
.pop-note__row { display: grid; grid-template-columns: 56px 1fr; column-gap: var(--space-2); }
.pop-note__label { font-size: 13px; line-height: 22px; font-weight: 700; color: var(--ink-muted); }
.pop-note__label--fix { color: var(--accent); }

/* Draft block */
.pop-draft { background: var(--surface-sunken); border: var(--stroke-2) solid var(--line); padding: var(--space-4); font-size: 16px; line-height: 24px; white-space: pre-wrap; }
.pop-draft__meta { display: flex; justify-content: space-between; font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* Streak */
.pop-streak { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
.pop-streak__num { font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 48px; }
.pop-streak__num--ok { color: var(--signal-ok); }
.pop-streak__num--warn { color: var(--signal-warn); }
.pop-streak__num--bad { color: var(--signal-bad); }
.pop-streak__label { font-size: 15px; color: var(--ink-muted); }
.pop-meter { display: flex; flex-direction: column; gap: var(--space-2); }
.pop-meter__pips { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-1); }
.pop-pip { height: 24px; border: var(--stroke-2) solid var(--line-strong); border-radius: var(--radius-sm); }
.pop-pip--posted { background: var(--accent); border-color: var(--accent); }
.pop-pip--today { border-color: var(--ink); border-style: dashed; }
.pop-meter__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-1); text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.pop-stat { border: var(--stroke-2) solid var(--line); padding: var(--space-3); }
.pop-stat__value { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; }
.pop-stat__label { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-ladder { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.pop-ladder__step { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-2); border: var(--stroke-2) solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink-muted); text-align: center; }
.pop-ladder__step .pop-sprite { width: 48px; height: 48px; }
.pop-ladder__step[aria-current="true"] { border-color: var(--signal-bad); color: var(--ink); }
.pop-ladder__step b { color: var(--ink); }

/* Saved idea card */
.pop-saved { border: var(--stroke-2) solid var(--line); background: var(--surface-raised); }
.pop-saved__head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: var(--stroke-2) solid var(--line); font-size: 13px; line-height: 18px; font-weight: 700; color: var(--signal-ok); }
.pop-saved__head::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.pop-saved__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.pop-saved__source { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.pop-saved__source q { font-style: italic; color: var(--ink); }
.pop-saved__idea { font-size: 16px; line-height: 24px; }
.pop-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-2); border: var(--stroke-2) solid var(--line-strong); font-size: 13px; line-height: 18px; font-weight: 700; }

/* Right-click menu mock */
.pop-menu { width: 240px; background: var(--surface-raised); border: var(--stroke-2) solid var(--line-strong); box-shadow: var(--shadow-block); padding: var(--space-1) 0; font-size: 13px; line-height: 18px; }
.pop-menu__item { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-3); color: var(--ink-muted); }
.pop-menu__item--pop { color: var(--on-accent); background: var(--accent); font-weight: 700; }
.pop-menu__item img { width: 16px; height: 16px; image-rendering: pixelated; }
