:root {
  --ink: #142b3b;
  --ink-2: #294456;
  --muted: #6c7a84;
  --paper: #fffdfa;
  --canvas: #eef2f3;
  --line: #d8e0e3;
  --line-dark: #b9c6cc;
  --orange: #bf5538;
  --orange-dark: #983d27;
  --green: #1d8a61;
  --green-pale: #e9f6ef;
  --blue-pale: #edf4f8;
  --navy: #102b3f;
  --shadow: 0 16px 42px rgba(18, 43, 59, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--sans); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(191,85,56,.2); outline-offset: 1px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.eyebrow { display: block; color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kicker { color: #ffbea9; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.signin-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(390px, .75fr); background: var(--paper); }
.signin-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 6.5vw 8vw; color: #fff; background: radial-gradient(circle at 80% 10%, rgba(74,133,153,.5), transparent 28%), linear-gradient(135deg, #0c2434 0%, #173d52 58%, #9c472f 135%); }
.signin-story::before, .signin-story::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; pointer-events: none; }
.signin-story::before { width: 520px; height: 520px; top: -245px; right: -180px; }
.signin-story::after { width: 380px; height: 380px; bottom: -240px; left: 12%; }
.signin-story > * { position: relative; z-index: 1; }
.signin-story h1 { max-width: 820px; margin: 18px 0 20px; font: 700 clamp(38px, 4.2vw, 62px)/1.06 var(--serif); letter-spacing: -.025em; }
.signin-lead { max-width: 690px; margin: 0; color: #d7e3e9; font-size: clamp(17px, 1.6vw, 23px); line-height: 1.5; }
.partner-lockup { display: flex; align-items: center; gap: 18px; }
.partner-lockup--light { align-self: flex-start; margin-bottom: 8vh; }
.logo-tile { display: grid; place-items: center; width: 122px; height: 68px; padding: 8px 12px; border: 1px solid rgba(20,43,59,.1); border-radius: 14px; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.13); }
.logo-tile img { max-height: 50px; object-fit: contain; }
.logo-tile--aft img { max-height: 42px; }
.partner-rule { width: 54px; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.2), rgba(255,255,255,.8), rgba(255,255,255,.2)); }
.signin-proof { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 48px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.18); }
.signin-proof article { display: grid; gap: 4px; }
.signin-proof strong { font: 700 34px/1 var(--serif); }
.signin-proof span { color: #b9ccd6; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
#generatedHeadlineField { margin-bottom: 18px; }
.signin-footnote { margin: 36px 0 0; color: #a9c0cc; font-size: 12px; letter-spacing: .04em; }
.signin-card { align-self: center; width: min(440px, calc(100% - 56px)); margin: 0 auto; padding: 48px; }
.signin-card h2 { margin: 20px 0 8px; font: 700 38px/1.05 var(--serif); }
.signin-card > p { color: var(--muted); }
.signin-card form { display: grid; gap: 18px; margin-top: 30px; }
.signin-card label, .modal label, .settings-form label { display: grid; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 800; letter-spacing: .025em; }
.signin-card input, .modal input, .modal textarea, .modal select, .settings-form input, .settings-form select { width: 100%; border: 1px solid var(--line-dark); border-radius: 10px; background: #fff; color: var(--ink); padding: 12px 13px; font-weight: 500; }
.version-pill { display: inline-flex; align-items: center; padding: 7px 11px; color: var(--orange-dark); border: 1px solid #edc1b4; border-radius: 999px; background: #fff3ef; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.demo-note { margin-top: 22px; padding: 13px 14px; border-left: 3px solid var(--orange); background: #fff7f3; font-size: 12px; line-height: 1.55; }
.form-error { min-height: 18px; margin-top: 10px; color: #a72f24; font-weight: 700; }
.mobile-lockup { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button--primary { color: #fff; background: var(--orange); box-shadow: 0 8px 18px rgba(191,85,56,.18); }
.button--primary:hover { background: var(--orange-dark); }
.button--quiet { border-color: var(--line); background: #fff; }
.button--quiet:hover { border-color: var(--line-dark); background: #f7f9f9; }
.button--wide { width: 100%; min-height: 46px; }
.round-button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: var(--orange); cursor: pointer; font-size: 22px; line-height: 1; }
.icon-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-size: 20px; }
.icon-button:hover { background: rgba(20,43,59,.08); }
.text-button { padding: 0; color: var(--orange-dark); font-size: 12px; font-weight: 800; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 74px; display: grid; grid-template-columns: minmax(310px, 1fr) auto minmax(310px, 1fr); align-items: center; gap: 20px; padding: 0 22px; color: #fff; background: #11191f; border-bottom: 1px solid #273640; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.logo-tile--compact { width: 82px; height: 52px; padding: 5px 9px; border-radius: 10px; box-shadow: none; }
.logo-tile--compact img { max-height: 40px; }
.brand-divider { width: 1px; height: 38px; background: #43515a; }
.brand-lockup > div { display: grid; gap: 3px; }
.brand-lockup strong { font: 700 19px/1 var(--serif); }
.brand-lockup span { color: #9bb0bc; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.topnav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #33454f; border-radius: 10px; background: #1a262e; }
.nav-button { padding: 8px 17px; border: 0; border-radius: 7px; color: #acbec8; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.nav-button.is-active { color: #fff; background: #304653; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.connection-badge { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #355266; border-radius: 999px; color: #c7dbe5; background: #183244; font-size: 11px; font-weight: 800; }
.connection-badge > span { width: 7px; height: 7px; border-radius: 50%; background: #4bd199; box-shadow: 0 0 0 4px rgba(75,209,153,.12); }
.connection-badge.is-disconnected { color: #ffd5cb; border-color: #794638; background: #3a2521; }
.connection-badge.is-disconnected > span { background: #ef765c; box-shadow: 0 0 0 4px rgba(239,118,92,.12); }
.profile-button { display: flex; align-items: center; gap: 9px; padding: 4px 7px 4px 4px; border: 0; color: #fff; background: transparent; cursor: default; text-align: left; }
.profile-button > span:first-child { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--navy); background: #f0dcca; font: 800 12px var(--sans); }
.profile-button > span:last-child { display: grid; gap: 2px; }
.profile-button b { max-width: 130px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-button small { color: #9fb1bb; text-transform: capitalize; }
.top-actions > .icon-button { color: #d4dfe5; border: 1px solid #34444e; }
.logout-button { min-height: 34px; padding: 7px 12px; border: 1px solid #3b4a54; border-radius: 8px; color: #dce6eb; background: #172229; cursor: pointer; font-size: 11px; font-weight: 800; }
.logout-button:hover { color: #fff; border-color: #5c6d77; background: #24323a; }

.workspace-view { height: calc(100vh - 74px); display: grid; grid-template-columns: 340px minmax(520px, 1fr); overflow: hidden; }
.workspace-view.story-is-open { grid-template-columns: minmax(0, 1fr); }
.workspace-view.story-is-open .queue-column { display: none; }
.queue-column { min-width: 0; background: #f7f9f9; }
.queue-column { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px 14px; }
.panel-heading h2 { margin: 5px 0 0; font: 700 25px/1 var(--serif); }
.queue-tools { display: grid; grid-template-columns: 1fr 105px; gap: 8px; padding: 0 14px 13px; }
.queue-tools input, .queue-tools select { min-width: 0; width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 10px; }
.story-list { flex: 1; overflow: auto; padding: 2px 10px 16px; }
.story-card { width: 100%; margin: 0 0 8px; padding: 14px; border: 1px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; text-align: left; }
.story-card:hover { background: #fff; border-color: var(--line); }
.story-card.is-active { background: #fff; border-color: #9eb6c3; box-shadow: 0 8px 20px rgba(18,43,59,.07); }
.story-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.story-card h3 { margin: 8px 0; font: 700 15px/1.25 var(--serif); }
.story-card p { margin: 0; color: var(--muted); font-size: 11px; }
.story-card small { color: #8b989f; font-size: 10px; }
.story-card-label { display: block; margin-top: 10px; color: #84939b; font-size: 8px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.story-card-label + h3 { margin: 3px 0 9px; }
.story-card-headline { min-height: 28px; margin-top: 3px !important; color: var(--ink-2) !important; font: 700 12px/1.35 var(--serif) !important; }
.story-card-publication { margin: 9px 0 5px !important; color: var(--orange-dark) !important; font-size: 9px !important; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; color: #3f5f51; background: var(--green-pale); font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.status-pill[data-status="idea"] { color: #77623c; background: #fff3da; }
.status-pill[data-status="review"] { color: #6b4d8f; background: #f3ecfb; }
.status-pill[data-status="published"] { color: #375b80; background: #e7f1fb; }
.queue-footer { display: flex; justify-content: space-between; padding: 13px 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }

.editor-column { min-width: 0; min-height: 0; overflow: hidden; background: #e8edef; }
.empty-state { height: 100%; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.empty-state h2 { margin: 18px 0 5px; font: 700 29px var(--serif); }
.empty-state p { margin: 0 0 20px; color: var(--muted); }
.empty-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--orange)); font: italic 700 38px var(--serif); box-shadow: var(--shadow); }
#storyEditor { height: 100%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.story-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #f8faf9; }
.story-identity { display: grid; gap: 5px; }
.story-header-metrics { display: flex; align-items: stretch; gap: 7px; }
.story-header-metrics > span { min-width: 92px; display: grid; gap: 2px; padding: 7px 10px; border: 1px solid #d8e0e3; border-radius: 8px; background: #fff; }
.story-header-metrics small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.story-header-metrics strong { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.publication-dot { color: var(--ink); font-size: 11px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.publication-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--orange); }
#saveState { color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; gap: 7px; }
.step-banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; padding: 15px 26px; color: #fff; background: linear-gradient(100deg, #163548, #244e60); }
.step-banner h2 { margin: 3px 0 3px; font: 700 22px/1.1 var(--serif); }
.step-banner p { margin: 0; color: #c8d8df; font-size: 11px; }
.step-banner .eyebrow { color: #ffb69f; }
.step-progress { display: flex; align-items: center; gap: 10px; }
.step-progress strong { font: 700 20px var(--serif); }
.step-progress > span { display: block; width: 96px; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.15); }
.step-progress i { display: block; height: 100%; border-radius: inherit; background: #ef7959; }
.story-workbench { --story-menu-width: 270px; flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: var(--story-menu-width) 8px minmax(0, 1fr); overflow: hidden; }
.story-menu-divider { position: relative; min-height: 0; cursor: col-resize; touch-action: none; background: #cfdbdf; outline-offset: -2px; }
.story-menu-divider::after { content: ""; position: absolute; left: 2px; top: 44%; width: 4px; height: 44px; border-radius: 4px; background: #6c8998; }
.story-menu-divider:hover, .story-menu-divider:focus-visible { background: #a5c7d3; }
.resizing-story-menu, .resizing-story-menu * { cursor: col-resize !important; user-select: none !important; }
.story-menu { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 24px 16px 18px; color: #dbe7ec; border-right: 1px solid #29495a; background: linear-gradient(180deg, #122f40 0%, #173849 100%); }
.story-menu-heading { padding: 0 9px 18px; border-bottom: 1px solid rgba(255,255,255,.11); }
.story-menu-heading .eyebrow { color: #f3a28a; }
.story-menu-heading h3 { margin: 6px 0 0; color: #fff; font: 700 21px/1.1 var(--serif); }
.story-menu-nav { flex: 1 1 0; min-height: 0; display: grid; align-content: start; gap: 7px; padding: 18px 5px 18px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #628093 transparent; scrollbar-width: thin; }
.story-menu-nav::-webkit-scrollbar { width: 8px; }
.story-menu-nav::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #628093; background-clip: padding-box; }
.story-menu-nav button { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; min-height: 50px; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; color: #c3d4dc; background: transparent; cursor: pointer; text-align: left; font-size: 12px; font-weight: 750; line-height: 1.28; }
.story-menu-nav button:hover { color: #fff; background: rgba(255,255,255,.06); }
.story-menu-nav button.is-active { color: #fff; border-color: rgba(239,121,89,.58); background: rgba(191,85,56,.2); box-shadow: inset 3px 0 0 #ef7959; }
.story-menu-nav button span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #d5e2e8; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 900; }
.story-menu-nav button.is-active span { color: #fff; background: var(--orange); }
.story-menu-nav .story-menu-edit, .story-menu-nav .story-menu-history { grid-template-columns: 1fr; padding-left: 14px; }
.story-menu-nav .story-menu-edit { margin-bottom: 2px; color: #fff; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.07); font-size: 14px; }
.story-menu-nav .story-menu-edit.is-active { border-color: rgba(239,121,89,.58); background: rgba(191,85,56,.2); box-shadow: inset 3px 0 0 #ef7959; }
.story-menu-section-label { margin: 7px 8px 1px; padding-top: 10px; color: #87a3b0; border-top: 1px solid rgba(255,255,255,.1); font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.story-menu-section-label--history { margin-top: 9px; }
.story-menu-nav .story-menu-history { color: #d8e5ea; }
.story-menu-nav button.is-complete { color: #fff; border-color: rgba(102,208,158,.5); background: rgba(24,119,82,.3); box-shadow: inset 3px 0 0 #58c892; }
.story-menu-nav button.is-complete span { color: #fff; background: var(--green); }
.menu-size-control { display: grid; gap: 8px; padding: 14px 9px 0; border-top: 1px solid rgba(255,255,255,.11); color: #9db3bd; font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.menu-size-control input { width: 100%; accent-color: #5acb95; }
.editor-scroll { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(20px, 3vw, 46px) 118px; background: #e8edef; scrollbar-gutter: stable; }
.story-panel { width: min(1080px, 100%); min-height: 100%; margin: 0 auto; padding: clamp(24px, 3vw, 42px); border: 1px solid #d7dedf; border-radius: 13px; background: var(--paper); box-shadow: 0 10px 30px rgba(18,43,59,.07); }
.story-meta-grid { display: grid; grid-template-columns: 1.25fr .7fr 1fr; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #e8ecec; }
.story-meta-grid label, .editor-field { display: grid; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.story-meta-grid select, .editor-field input, .editor-field textarea { width: 100%; padding: 9px 10px; border: 1px solid #d4dcdf; border-radius: 7px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 500; letter-spacing: normal; text-transform: none; resize: vertical; }
.story-meta-value { min-height: 38px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid #d8e0e3; border-radius: 7px; color: var(--ink); background: #f2f5f5; font-size: 12px; font-weight: 800; letter-spacing: normal; text-transform: none; }
.story-status-value { width: fit-content; min-width: 105px; justify-content: center; border-radius: 999px; text-transform: capitalize; }
.story-status-value[data-status="draft"] { color: #765d2d; border-color: #ead8ad; background: #fff7df; }
.story-status-value[data-status="approved"] { color: #276247; border-color: #b8d9ca; background: #eaf6f0; }
.story-status-value[data-status="published"] { color: #315f85; border-color: #bed4e7; background: #eaf3fb; }
.edit-polish-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 15px 17px; border: 1px solid #b9d7ca; border-radius: 10px; background: linear-gradient(100deg, #f0f8f4, #fffaf7); }
.edit-polish-row > div { display: grid; gap: 4px; }
.edit-polish-row > .writing-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-polish-row b { font: 700 17px var(--serif); }
.edit-polish-row small { color: var(--muted); line-height: 1.4; }
.edit-polish-row .button { flex: 0 0 auto; min-width: 105px; }
.editor-field { margin-top: 20px; }
.editor-field--title input { padding: 5px 0 9px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font: 700 34px/1.15 var(--serif); }
.editor-field--headline input { font: 700 21px/1.2 var(--serif); }
.brief-grid, .editor-lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.story-canvas { min-height: 420px; padding: 22px !important; border-color: #cad5d9 !important; font: 17px/1.7 Georgia, serif !important; }
.rich-story-editor { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 300px; padding: 18px; border: 1px solid #cad5d9; border-radius: 8px; background: #fff; color: var(--ink); font: 17px/1.7 Georgia, serif; font-weight: 400; text-transform: none; letter-spacing: normal; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; overflow-y: auto; }
.rich-story-editor:focus-visible { outline: 2px solid #91b6c7; outline-offset: 1px; }
.rich-story-editor:empty::before { content: attr(data-placeholder); color: #73828a; pointer-events: none; }
.rich-story-editor p, .polish-copy p { margin: 0 0 1em; }
.rich-story-editor h2, .polish-copy h2 { margin: 1.3em 0 .65em; font: var(--story-subheading-weight, 400) 1.1em/1.4 Georgia, serif; }
.rich-story-editor > :first-child { margin-top: 0; }
.rich-story-editor > :last-child { margin-bottom: 0; }
.modal .rich-story-field { display: grid; gap: 8px; color: var(--ink-2); font-size: 12px; font-weight: 800; letter-spacing: .025em; }
.polish-comparison .rich-story-editor { border: 0; border-radius: 0; font-size: 16px; }
.polish-comparison .polish-copy { font-size: 16px; line-height: 1.7; }
.story-header-metrics { flex-wrap: wrap; }
.source-box { margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.source-box > div:first-child { display: flex; justify-content: space-between; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.source-list { display: grid; gap: 8px; margin-top: 12px; }
.source-item { padding: 10px; border-radius: 7px; background: #f3f6f6; }
.source-item b { display: block; font-size: 12px; }
.source-item a { color: var(--orange-dark); font-size: 10px; }
.source-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.story-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.story-panel-heading h2 { margin: 5px 0 7px; font: 700 clamp(26px, 3vw, 36px)/1.06 var(--serif); letter-spacing: -.02em; }
.story-panel-heading p { max-width: 670px; margin: 0; color: var(--muted); line-height: 1.5; }
.panel-save { margin-top: 22px; }
.panel-empty { width: 100%; display: grid; place-content: center; gap: 7px; min-height: 150px; padding: 26px; border: 1px dashed var(--line-dark); border-radius: 10px; color: var(--muted); background: #f8faf9; text-align: center; }
.panel-empty b { color: var(--ink); font: 700 18px var(--serif); }
.panel-empty label { margin-top: 16px; text-align: left; }

.headline-list { display: grid; gap: 12px; }
.headline-list label, .seo-package-grid label, .caption-form label, .publish-status label, .image-browser-toolbar label { display: grid; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.headline-list input, .seo-package-grid input, .seo-package-grid textarea, .caption-form input, .caption-form textarea, .image-browser-toolbar input { width: 100%; padding: 11px 12px; border: 1px solid #ccd7db; border-radius: 8px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 500; letter-spacing: normal; text-transform: none; resize: vertical; }
.headline-list input { font: 700 19px/1.25 var(--serif); }
.seo-headline-option { width: 100%; display: grid; gap: 6px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; }
.seo-headline-option:hover { border-color: #cf8a76; background: #fffaf7; box-shadow: 0 7px 20px rgba(18,43,59,.07); transform: translateY(-1px); }
.seo-headline-option > span { color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.seo-headline-option > b { font: 700 20px/1.25 var(--serif); }
.seo-headline-option > small { color: var(--muted); font-size: 10px; }
.seo-headline-option.is-selected { border-color: #77b698; background: #eef8f3; box-shadow: inset 4px 0 0 var(--green); }
.seo-headline-option.is-selected > small { color: #26704f; font-weight: 900; }
.seo-package-grid, .caption-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ai-status-card { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #b8d8c9; border-radius: 10px; color: #245f45; background: #eef8f3; }
.ai-status-card > span { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(38,133,94,.12); }
.ai-status-card > div { display: grid; gap: 3px; }
.ai-status-card b { font-size: 11px; }
.ai-status-card small { color: #587469; font-size: 10px; }
.ai-status-card.is-disconnected { color: #8c382b; border-color: #e7b5aa; background: #fff1ed; }
.ai-status-card.is-disconnected > span { background: #c95139; box-shadow: 0 0 0 4px rgba(201,81,57,.12); }
.span-two { grid-column: 1 / -1; }

.image-action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.image-action { min-height: 116px; display: grid; align-content: center; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; }
.image-action:hover { border-color: #c4745c; box-shadow: 0 8px 22px rgba(18,43,59,.08); transform: translateY(-1px); }
.image-action b { font: 700 19px var(--serif); }
.image-action small { color: var(--muted); line-height: 1.4; }
.current-image-card { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.current-image-card > img { width: 100%; max-height: 440px; aspect-ratio: 970 / 550; object-fit: cover; background: #dce4e7; }
.current-image-card > div:not(.panel-empty) { padding: 17px 20px; }
.current-image-card h3 { margin: 4px 0 6px; font: 700 20px var(--serif); }
.current-image-card p { margin: 0 0 4px; color: var(--muted); }
.current-image-card small { color: var(--green); font-weight: 900; }
.image-browser { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.image-browser-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 18px; margin-bottom: 15px; }
.image-browser-toolbar > div { display: flex; align-items: center; gap: 9px; }
.round-arrow { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-dark); border-radius: 50%; color: var(--ink); background: #fff; cursor: pointer; font-size: 17px; }
.round-arrow:disabled { opacity: .35; cursor: default; }
#imageSetLabel { min-width: 78px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.internet-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.internet-image-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.internet-image-card > img { width: 100%; aspect-ratio: 970 / 550; object-fit: cover; background: #dfe6e8; }
.internet-image-card > div { display: grid; gap: 6px; padding: 12px; }
.internet-image-card h3 { min-height: 32px; margin: 0; overflow: hidden; font: 700 14px/1.2 var(--serif); }
.internet-image-card p, .internet-image-card small { margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.internet-image-card .button { margin-top: 6px; }
.image-license-note { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.image-loading { grid-column: 1 / -1; padding: 50px; color: var(--muted); text-align: center; }

.caption-image-preview { margin-bottom: 20px; overflow: hidden; border-radius: 12px; background: #e3e9eb; }
.caption-image-preview img { width: 100%; max-height: 420px; aspect-ratio: 970 / 550; object-fit: cover; }
.publish-status { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.publish-status label { min-width: 230px; }
.publish-status .story-meta-value { margin-top: 8px; }
.publish-status p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.5; }
.publish-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.publish-card { min-height: 145px; display: grid; align-content: center; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; }
.publish-card:hover { border-color: #b4c3c9; box-shadow: 0 9px 24px rgba(18,43,59,.08); transform: translateY(-1px); }
.publish-card b { font: 700 20px/1.15 var(--serif); }
.publish-card small { color: var(--muted); line-height: 1.45; }
.publish-card--primary { color: #fff; border-color: var(--orange); background: linear-gradient(135deg, var(--orange), #9e402a); }
.publish-card--primary small { color: #ffe2d8; }
.publish-result { display: flex; justify-content: space-between; gap: 15px; margin-top: 18px; padding: 14px 17px; border: 1px solid #a9d3bf; border-radius: 9px; color: #225b43; background: #eef8f3; }
.publish-result a { color: inherit; font-weight: 900; }
.history-timeline { display: grid; gap: 12px; }
.history-event { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding: 15px 17px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.history-event::before { content: ""; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(196,82,53,.1); }
.history-event h3 { margin: 0 0 4px; font: 700 16px var(--serif); }
.history-event p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.history-event time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.history-empty { padding: 44px 20px; color: var(--muted); text-align: center; }
.story-action-dock { position: fixed; right: 24px; bottom: 24px; z-index: 18; display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid rgba(168,183,190,.8); border-radius: 14px; background: rgba(255,253,250,.94); box-shadow: 0 16px 44px rgba(13,37,51,.22); backdrop-filter: blur(12px); }
.story-action-dock .button { min-height: 44px; padding-inline: 19px; }
.story-action-dock #completeStep { min-width: 118px; background: var(--green); box-shadow: 0 8px 18px rgba(38,133,94,.2); }
.story-action-dock #completeStep:hover { background: #1f744f; }

.settings-tabs { display: flex; gap: 5px; padding: 0 16px 11px; border-bottom: 1px solid var(--line); }
.settings-tabs button { padding: 8px 11px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.settings-tabs button.is-active { color: var(--ink); background: #e2e9ec; }

.page-view { min-height: calc(100vh - 74px); padding: 38px clamp(24px, 4vw, 68px) 70px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page-heading h1 { margin: 6px 0 8px; font: 700 39px/1 var(--serif); }
.page-heading p { margin: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card { padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 7px 20px rgba(18,43,59,.04); }
.metric-card span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 10px; font: 700 32px var(--serif); }
.metric-card small { color: var(--muted); }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(18,43,59,.04); }
.settings-card h2 { margin: 0; font: 700 24px var(--serif); }
.settings-card > p, .card-title-row p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.bar-chart { display: grid; gap: 13px; margin-top: 24px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 32px; align-items: center; gap: 10px; font-size: 11px; }
.bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 9px; overflow: hidden; border-radius: 999px; background: #edf1f2; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), #dd8067); }
.access-badge { padding: 7px 10px; border: 1px solid #b5d6c6; border-radius: 999px; color: #277151; background: #ebf7f1; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.settings-tabs { margin-bottom: 18px; padding: 0 0 10px; }
.settings-pane { display: grid; gap: 18px; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.system-selection { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, .7fr); gap: 14px; margin-top: 22px; }
.system-selection label { display: grid; gap: 8px; color: var(--ink-2); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.system-selection select { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid var(--line-dark); border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; text-transform: none; }
.selection-note { margin-top: 12px !important; padding: 10px 12px; border-left: 3px solid var(--green); color: var(--ink-2) !important; background: #f0f7f4; font-size: 11px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 20px; }
.model-card { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfc; }
.model-card.is-default { border-color: #8bb4a2; box-shadow: inset 0 3px 0 var(--green); }
.model-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-card h3 { margin: 0; font: 700 17px var(--serif); }
.model-card p { margin: 6px 0 12px; color: var(--muted); font-size: 11px; }
.model-card dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 0; font-size: 10px; }
.model-card dt { color: var(--muted); text-transform: uppercase; }
.model-card dd { margin: 0; font-weight: 800; }
.model-details, .route-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.model-details summary, .route-details summary { color: var(--orange-dark); cursor: pointer; font-size: 10px; font-weight: 900; }
.model-details dl { margin-top: 12px; }
.route-details { margin-top: 22px; }
.route-details summary { font-size: 12px; }
.usage-summary { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 0; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.usage-summary div { padding: 15px 18px; border-right: 1px solid var(--line); }
.usage-summary div:last-child { border-right: 0; }
.usage-summary span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.usage-summary strong { display: block; margin-top: 4px; font: 700 23px var(--serif); }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e9eded; text-align: left; font-size: 11px; }
th { color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
td b { font: 700 13px var(--serif); }
.settings-form { display: grid; max-width: 850px; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-form .button { justify-self: start; }
.scope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 22px; }
.scope-item { padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfc; }
.scope-item b { display: block; font: 700 16px var(--serif); }
.scope-item p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.retained-tag { display: inline-flex; margin-bottom: 8px; padding: 4px 7px; border-radius: 999px; color: #91432f; background: #fcece7; font-size: 9px; font-weight: 900; }

.modal { width: min(590px, calc(100vw - 36px)); padding: 0; border: 0; border-radius: 15px; box-shadow: 0 24px 70px rgba(10,30,44,.3); }
.modal::backdrop { background: rgba(11,27,38,.62); backdrop-filter: blur(3px); }
.modal form { display: grid; gap: 16px; padding: 25px; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-heading h2 { margin: 5px 0 0; font: 700 27px var(--serif); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }
.voice-field { display: flex; align-items: flex-start; gap: 6px; min-width: 0; width: 100%; }
.voice-field > input, .voice-field > textarea { flex: 1 1 auto; min-width: 0; }
.voice-input-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 36px; margin-top: 2px; padding: 0; color: #28556a; background: #f0f5f7; border: 1px solid #cbdadf; border-radius: 8px; cursor: pointer; }
.voice-input-button:hover { background: #dfecef; border-color: #7897a4; }
.generate-story-modal { width: min(880px, calc(100vw - 36px)); }
.generate-story-modal form, .voice-dialog-content { max-height: 88vh; overflow-y: auto; }
.voice-dialog-content { display: grid; gap: 16px; padding: 25px; }
.voice-modal p, .generate-story-modal .modal-heading p { color: var(--muted); line-height: 1.5; }
.voice-modal .modal-actions, .generate-story-modal .modal-actions { flex-wrap: wrap; }
.target-word-field { max-width: 240px; }
#voiceStatus, #storyGenerationStatus { padding: 12px; margin: 0; color: #214c61; background: #edf4f7; border-radius: 8px; font-size: 14px; line-height: 1.5; }
#generatedStoryText { font: 15px/1.65 var(--serif); }
#voiceTranscript { font: 15px/1.5 var(--sans); }
.voice-meter-panel { padding: 14px 16px; border: 1px solid #cbdbdf; border-radius: 12px; background: #f3f8f7; }
.voice-meter-heading { display: flex; justify-content: space-between; gap: 12px; color: #29505e; font-size: 13px; }
.voice-level-meter { height: 52px; margin-top: 10px; }
.voice-level-bars { height: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; }
.voice-level-bars span { flex: 1; max-width: 12px; height: 4px; border-radius: 6px; background: #4a967c; transition: height 70ms linear; }
.voice-live-preview { padding: 16px; border: 1px solid #cbdadf; border-radius: 10px; background: #fff; max-height: 180px; overflow-y: auto; }
.voice-live-preview p { min-height: 24px; margin-bottom: 0; white-space: pre-wrap; }
.voice-live-interim { color: #73878f; font-style: italic; }
@media (prefers-reduced-motion: reduce) { .voice-level-bars span { transition: none; } }
.polish-modal { width: min(1180px, calc(100vw - 40px)); }
.image-browser-modal { width: min(1180px, calc(100vw - 40px)); }
.image-browser-dialog { max-height: 90vh; padding: 25px; overflow-y: auto; }
.image-browser-dialog .modal-heading p { max-width: 720px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.image-browser-dialog .image-browser { margin-top: 18px; }
.polish-modal form { max-height: 90vh; overflow-y: auto; }
.polish-modal .modal-heading p { max-width: 720px; margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.polish-preview { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.polish-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.polish-summary > div { display: grid; gap: 5px; }
.polish-summary b { font: 700 20px var(--serif); }
.polish-engine { padding: 6px 9px; border-radius: 999px; color: #276247; background: var(--green-pale); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.polish-change-list { display: grid; gap: 7px; margin: 0; padding: 14px 18px 14px 34px; border: 1px solid #e3d8cf; border-radius: 9px; color: var(--ink-2); background: #fffaf6; font-size: 11px; line-height: 1.45; }
.polish-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 330px; }
.polish-comparison article { min-width: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.polish-comparison h3 { margin: 0; padding: 11px 14px; color: var(--muted); border-bottom: 1px solid var(--line); background: #eef3f4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.polish-copy, .polish-comparison textarea { width: 100%; min-height: 300px; margin: 0; padding: 16px; overflow: auto; border: 0; color: var(--ink); background: #fff; font: 14px/1.65 var(--serif); white-space: pre-wrap; resize: vertical; }
.polish-comparison textarea:focus { outline: 2px solid rgba(191,85,56,.18); outline-offset: -2px; }
.checkbox-label { grid-template-columns: auto 1fr !important; align-items: center; justify-content: start; }
.checkbox-label input { width: auto; }
.story-identity { flex-wrap: wrap; }
#headerStoryStatus { text-transform: capitalize; font-size: 14px; }
#headerStoryStatus[data-status="draft"] { background: #edf1f4; color: #314b5b; }
#headerStoryStatus[data-status="approved"] { background: #dff3e8; color: #206143; }
#headerStoryStatus[data-status="published"] { background: #d9eafb; color: #17476f; }
.edit-story-image { margin: 24px 0; }
.edit-story-image img { display: block; width: 100%; max-width: 970px; aspect-ratio: 970 / 550; object-fit: cover; border-radius: 8px; }
.edit-story-image figcaption { margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.edit-story-image figcaption small { display: block; color: var(--muted); font-size: 13px; }
.story-formatting { display: grid; gap: 8px; margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.story-formatting label { font-size: 15px; text-transform: none; letter-spacing: 0; }
.story-formatting input { width: 18px; height: 18px; accent-color: #276247; }
.story-formatting small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.story-preview-details { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.story-preview-details summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.formatted-story-preview { max-width: 760px; margin: 24px auto; font: 17px/1.75 var(--serif); overflow-wrap: anywhere; }
.formatted-story-preview h1 { font-size: 30px; line-height: 1.25; }
.formatted-story-preview h2 { margin: 24px 0 8px; font-size: 21px; line-height: 1.4; }
.formatted-story-preview p { margin: 0 0 18px; }
.formatted-story-preview .byline { font: 14px/1.5 var(--sans); color: var(--muted); }
.image-generation-status, .wordpress-connection-note { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.wordpress-connection-note { margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
#wpConnectionResult { font-size: 15px; line-height: 1.5; }
.toast { position: fixed; left: 22px; bottom: 22px; z-index: 100; max-width: 420px; padding: 13px 16px; border-radius: 10px; color: #fff; background: #19384a; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #9f3529; }

@media (max-width: 1250px) {
  .workspace-view { grid-template-columns: 300px minmax(460px, 1fr); }
  .topbar { grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr); }
  .connection-badge { display: none; }
  .story-workbench { --story-menu-width: 245px; }
  .editor-scroll { padding: 16px; }
  .story-panel { padding: 27px; }
  .publish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .signin-shell { grid-template-columns: 1fr; }
  .signin-story { display: none; }
  .mobile-lockup { display: flex; margin-bottom: 38px; }
  .mobile-lockup .partner-rule { background: var(--line-dark); }
  .signin-card { padding: 50px 0; }
  .topbar { grid-template-columns: 1fr auto; }
  .topnav { order: 3; position: fixed; z-index: 30; left: 50%; bottom: 15px; transform: translateX(-50%); box-shadow: var(--shadow); }
  .story-action-dock { right: 16px; bottom: 78px; }
  .profile-button > span:last-child { display: none; }
  .workspace-view { grid-template-columns: 260px minmax(0, 1fr); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 12px; }
  .brand-lockup strong { font-size: 16px; }
  .brand-lockup > div span, .brand-divider { display: none; }
  .logo-tile--compact { width: 67px; height: 44px; }
  .workspace-view { height: calc(100vh - 64px); grid-template-columns: 1fr; }
  .queue-column { display: none; }
  .story-toolbar { flex-wrap: wrap; }
  .step-banner { padding: 14px 16px; }
  .step-banner p, .step-progress { display: none; }
  .story-workbench { display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .story-menu { height: auto; padding: 10px; border-right: 0; border-bottom: 1px solid #29495a; }
  .story-menu-heading, .story-menu-divider { display: none; }
  .story-menu-nav { display: flex; gap: 6px; padding: 0; overflow-x: auto; }
  .story-menu-nav button { flex: 0 0 170px; min-height: 46px; }
  .editor-scroll { width: 100%; margin: 0; padding: 12px 10px 80px; border: 0; }
  .story-panel { padding: 20px 16px; border-radius: 8px; }
  .story-meta-grid, .brief-grid, .editor-lower-grid, .form-grid, .scope-grid, .analytics-grid, .system-selection, .seo-package-grid, .caption-form, .image-action-row, .internet-image-grid, .publish-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .story-panel-heading, .publish-status { display: grid; }
  .edit-polish-row, .polish-summary { align-items: stretch; display: grid; }
  .polish-comparison { grid-template-columns: 1fr; }
  .image-browser-toolbar { grid-template-columns: 1fr; }
  .story-action-dock { right: 10px; bottom: 76px; max-width: calc(100vw - 20px); overflow-x: auto; }
  .page-view { padding: 25px 15px 90px; }
  .page-heading { display: grid; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .profile-button { display: none; }
  .usage-summary { grid-template-columns: 1fr 1fr; }
  .usage-summary div:nth-child(2) { border-right: 0; }
  .usage-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.operation-progress-modal { width: min(680px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; }
.wordpress-setup-guide { padding: 18px 22px 18px 42px; margin: 0; background: #f0f5f7; border-radius: 12px; color: #385565; }
.wordpress-setup-guide li { padding: 4px 0; font-size: 14px; line-height: 1.6; }
.operation-progress-content { padding: 28px; }
.operation-progress-card { border: 1px solid #d5e0e4; border-radius: 14px; padding: 20px; background: #f6f9fa; margin: 16px 0; }
.operation-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.operation-progress-heading h3 { margin: 0; font: 600 21px/1.3 Georgia, serif; }
.operation-progress-clock { display: grid; text-align: right; flex-shrink: 0; }
.operation-progress-clock small { color: #657881; font-size: 10px; letter-spacing: .13em; }
.operation-progress-timer { font-size: 30px; font-variant-numeric: tabular-nums; color: #b74d31; }
.operation-progress-steps { margin: 22px 0 8px; padding: 0; list-style: none; }
.operation-progress-steps li { position: relative; padding: 0 0 20px 28px; display: grid; gap: 5px; border-left: 2px solid #cddadd; margin-left: 7px; }
.operation-progress-steps li:last-child { border-color: transparent; padding-bottom: 0; }
.operation-progress-steps li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #25845e; }
.operation-progress-steps .is-current::before { background: #c75d3c; box-shadow: 0 0 0 4px #f3ddd4; }
.operation-progress-steps small { color: #5c707c; font-size: 13px; line-height: 1.5; }
.operation-progress-card.has-error { border-color: #d58b7e; background: #fff5f2; }
.operation-progress-reopen { position: fixed; left: 24px; bottom: 92px; z-index: 100; box-shadow: 0 5px 20px #1233; }
.operation-progress-modal .modal-actions { align-items: center; justify-content: space-between; }
.operation-progress-modal .modal-actions .dialog-note { max-width: 300px; }
@media (max-width: 600px) { .operation-progress-content { padding: 16px; } .operation-progress-heading { align-items: flex-start; } .operation-progress-heading h3 { font-size: 18px; } }

.publish-result { flex-wrap: wrap; }
.publish-result .wordpress-metadata { flex-basis: 100%; border-top: 1px solid #a9d3bf; padding-top: 8px; }
