/* Redline's editorial workspace: paper, ink, and restrained red accents. */
:root { --radius:10px; --paper:#f5f4f0; --line:#e3e0d8; --ink:#242821; --ink-soft:#62675e; --list-surface:#fcfcfa; --selected-surface:#f5eae6; --ok-surface:#f7faf7; --focus-halo:#2f5d8a22; }
:root[data-theme="dark"] { --list-surface:#181818; --selected-surface:#303030; --ok-surface:#222a24; --focus-halo:#9dc4eb33; }
body { min-height:100vh; }
button, input, select { font:inherit; }
button:disabled { cursor:wait; }
a:focus-visible, select:focus-visible { outline:2px solid var(--blue); outline-offset:4px; }
.masthead { background:var(--paper-raised); border-bottom:1px solid var(--line); padding:20px 32px 16px; }
.masthead-meta { padding:0; margin-top:14px; gap:16px; flex-wrap:wrap; }
.masthead-meta > div { flex-wrap:wrap; }
.masthead-nav button { background:none; border:0; padding:8px 12px; border-radius:8px; }
.masthead-nav button:hover { background:var(--paper); }
.connect-wrap { background:var(--paper-raised); border:1px solid var(--line); border-radius:18px; padding:36px; margin:48px auto; box-shadow:0 8px 30px #24282105; }
.connect-wrap h1 { font-size:32px; }
.field input { min-height:48px; border-radius:8px; transition:border-color .15s, box-shadow .15s; }
.field input:focus { border-color:var(--blue); box-shadow:0 0 0 3px var(--focus-halo); }
input::placeholder { color:var(--ink-soft); opacity:1; }
input { caret-color:var(--ink); }
input:-webkit-autofill { -webkit-text-fill-color:var(--ink); -webkit-box-shadow:0 0 0 1000px var(--paper-raised) inset; }
.btn-primary { min-height:44px; border-radius:8px; }
.btn-text { min-height:32px; }
.connect-actions { flex-wrap:wrap; }
.auth-help { flex-wrap:wrap; }
.dashboard { padding-top:36px; }
.workspace-heading { display:flex; justify-content:space-between; align-items:end; flex-wrap:wrap; gap:20px; margin-bottom:26px; }
.workspace-heading h2 { font:600 32px var(--serif); margin:0 0 8px; }
.workspace-heading p { color:var(--ink-soft); margin:0; font-size:14px; }
.archive-search { display:grid; gap:5px; font-size:12px; font-weight:600; }
.archive-search input { width:260px; max-width:100%; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--paper-raised); color:var(--ink); }
.summary-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; border:0; padding:0; margin-bottom:24px; }
.summary-stat { padding:20px; background:var(--paper-raised); border:1px solid var(--line); border-radius:12px; min-width:0; }
.summary-stat .num { font-size:34px; }
.summary-stat .label { margin-top:10px; }
.work-area { border-radius:14px; overflow:hidden; grid-template-columns:minmax(250px,340px) minmax(0,1fr); }
.post-list { background:var(--list-surface); }
.post-row { width:100%; text-align:left; background:transparent; color:var(--ink); border:0; border-bottom:1px solid var(--line); min-height:86px; }
.post-row.active { background:var(--selected-surface); box-shadow:inset 3px 0 var(--red); }
.post-row-title { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.45; }
.score-badge { border-radius:12px; }
.detail-panel { min-width:0; padding:28px; }
.detail-title { font-size:26px; line-height:1.3; }
.issue-card { border-radius:8px; padding:18px; }
.issue-card.ok { background:var(--ok-surface); }
/* Explicit colour pairs for feedback, badges, and disabled controls. */
:root[data-theme="dark"] .notice { color:var(--gold); }
:root[data-theme="dark"] .notice.error { color:var(--red); }
:root[data-theme="dark"] .score-badge { color:var(--paper); }
.score-badge.gold { color:#242821; }
.fix-btn:disabled { opacity:1; cursor:default; border-color:var(--line); color:var(--ink-soft); }
.fix-btn:disabled:hover { background:transparent; color:var(--ink-soft); }
.btn-primary:disabled { opacity:1; background:var(--line); color:var(--ink-soft); cursor:default; }
::selection { background:var(--blue-soft); color:var(--ink); }
.fix-btn { border-radius:6px; min-height:36px; }
.notice { border-radius:8px; overflow-wrap:anywhere; }
.pricing-wrap { max-width:980px; }
.plan-card { border-radius:16px; padding:30px; box-shadow:0 4px 20px #24282104; }
.plan-card-pro { border:2px solid var(--red); }
#accountScreen .field { padding:16px 0; margin:0; border-bottom:1px solid var(--line); }
#accountScreen .field .hint { font-size:15px; overflow-wrap:anywhere; }
#accountScreen .connect-actions { margin-top:22px; }
.track-box { border:1px solid var(--line); border-radius:10px; }
.audit-plan { margin:0 0 24px; padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--paper-raised); color:var(--ink); }
.audit-plan[hidden] { display:none; }
.score-method { margin:0 0 24px; padding:16px; color:var(--ink-soft); background:var(--paper-raised); border:1px solid var(--line); border-radius:8px; font-size:14px; line-height:1.6; }
.score-method summary { color:var(--ink); cursor:pointer; font-weight:600; }
.score-method details { margin-top:12px; }
.score-method li,.import-preview { overflow-wrap:anywhere; }
.import-preview { max-height:320px; overflow:auto; white-space:pre-wrap; }
.history-scroll { overflow-x:auto; }
.history-table { width:100%; border-collapse:collapse; font-size:14px; color:var(--ink); }
.history-table caption { text-align:left; padding:12px 0; color:var(--ink-soft); }
.history-table th,.history-table td { padding:12px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
.history-table th { background:var(--paper); }
#scoreHistory { margin-top:24px; }
.audit-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.audit-plan h3 { margin:0; font:600 22px var(--serif); }
.audit-plan p,.audit-group span { color:var(--ink-soft); font-size:13px; line-height:1.6; }
.audit-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:12px; margin:16px 0; }
.audit-group { display:grid; gap:8px; padding:16px; text-align:left; font:inherit; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-radius:8px; cursor:pointer; }
.audit-group[aria-pressed="true"] { border-color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue); }
.audit-group:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
#auditFilterStatus:not(:empty) { margin:0 0 16px; color:var(--ink-soft); font-size:13px; }
.site-footer { justify-content:flex-start; gap:24px; padding-top:24px; }
.site-footer > :first-child { margin-right:auto; }
@media(max-width:860px) { .work-area { grid-template-columns:1fr; } .post-list { max-height:310px; border-right:0; border-bottom:1px solid var(--line); } }
@media(max-width:600px) { .masthead { padding:16px 20px; } .masthead-tagline { display:none; } .connect-wrap { margin:24px 16px; padding:24px; } .dashboard { padding:24px 16px; } .summary-row { grid-template-columns:repeat(2,1fr); } .summary-stat { padding:16px; } .detail-panel { padding:20px; } .pricing-wrap { padding:0 16px; margin:32px auto; } .archive-search,.archive-search input { width:100%; } .site-footer { padding:24px 20px; gap:18px; } }
@media(prefers-reduced-motion:no-preference) { .connect-wrap,.dashboard.active,.pricing-wrap { animation:arrive .18s ease-out; } @keyframes arrive { from { opacity:.6; transform:translateY(5px); } to { opacity:1; transform:none; } } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }

/* Editorial polish: shared rhythm, quiet surfaces, and clear keyboard focus. */
.connect-wrap, .plan-card { border-radius:12px; box-shadow:none; }
.connect-wrap h1 { line-height:1.2; }
.connect-wrap p.lede { margin-bottom:24px; }
.field { margin-bottom:24px; }
.field-label { font-size:12.5px; font-weight:600; margin-bottom:6px; }
.connect-actions { gap:12px 24px; }
.btn-secondary { min-height:44px; border-radius:8px; }
.btn-secondary:not(:disabled) { cursor:pointer; color:var(--ink); }
.btn-secondary:not(:disabled):hover { border-color:var(--ink-soft); }
.btn-secondary:disabled { cursor:default; }
summary:focus-visible { outline:2px solid var(--blue); outline-offset:4px; border-radius:2px; }
.post-row:focus-visible { outline-offset:-3px; }
.plan-card:hover { box-shadow:none; }
.plan-features li { border-top:0; }
.plan-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; }
.plan-price strong { overflow-wrap:anywhere; }
.plan-card > button { margin-top:8px; }
#retryPricing { width:auto; }
#accountScreen .connect-actions { margin-top:24px; }
#disconnectBeehiivBtn { color:var(--red); }
.summary-row { gap:16px; }
.summary-stat .label { margin-top:8px; }
#scoreDisclaimer { border:0; border-left:3px solid var(--line); border-radius:0; background:transparent; }
.score-method p:last-child { margin-bottom:0; }
.detail-title { overflow-wrap:anywhere; }
.issue-head { flex-wrap:wrap; gap:8px 16px; }
.issue-head > div:first-child { flex:1 1 240px; min-width:0; }
.issue-impact { max-width:100%; white-space:normal; }
.issue-card, .track-box { overflow-wrap:anywhere; }
.issue-card:last-child { margin-bottom:0; }
.issue-locked .btn-text { font-size:inherit; }
#detailPanel { min-width:0; }
.site-footer button.nav-link { padding:0; border:0; background:none; color:var(--blue); font:inherit; min-height:32px; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:600px) {
  .connect-wrap h1, .workspace-heading h2 { font-size:28px; }
  .plan-card { padding:24px; }
  .detail-title { font-size:24px; }
  .connect-actions > .btn-primary { width:100%; }
  .issue-head > div:first-child { flex-basis:100%; }
}
