:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #172033; background: #f3f6fa; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: #155eef; }
button, input, textarea, select { font: inherit; }
.topbar { height: 58px; display: flex; align-items: center; gap: 18px; padding: 0 24px; background: #fff; border-bottom: 1px solid #dce3ec; }
.brand { color: #172033; text-decoration: none; font-size: 19px; font-weight: 750; letter-spacing: -.02em; margin-right: auto; }
.user { color: #57647a; font-size: 14px; }
.topbar form { margin: 0; }
.link-button { border: 0; background: none; color: #155eef; cursor: pointer; padding: 8px; }
.shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.protected-shell { display: contents; }
.sidebar { background: #fff; border-right: 1px solid #dce3ec; padding: 26px 14px; }
.sidebar h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #778298; margin: 0 10px 12px; }
.workspace-link { display: flex; flex-direction: column; gap: 3px; padding: 10px; color: #28344a; text-decoration: none; border-radius: 7px; }
.workspace-link:hover, .workspace-link.active { background: #edf4ff; color: #124fcb; }
.workspace-link small { color: #778298; }
.content { width: min(100%, 1080px); padding: 42px clamp(20px, 5vw, 64px) 80px; }
.centered { max-width: 620px; margin: 9vh auto; }
.panel { background: #fff; border: 1px solid #dce3ec; border-radius: 10px; padding: clamp(20px, 3vw, 32px); margin: 0 0 20px; box-shadow: 0 1px 2px rgba(17, 31, 53, .04); }
.panel h2:first-child { margin-top: 0; }
.eyebrow { color: #496078; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; font-size: 12px; margin: 0 0 8px; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.025em; }
h2 { font-size: 21px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.button, .secondary { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 16px; border-radius: 7px; text-decoration: none; font-weight: 700; cursor: pointer; }
.button { color: #fff; background: #155eef; border: 1px solid #155eef; }
.button:hover { background: #0f4fcf; }
.secondary { color: #26354d; background: #fff; border: 1px solid #b9c4d3; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.notice { background: #eaf3ff; border: 1px solid #b7d6ff; color: #173e72; padding: 12px 15px; border-radius: 8px; margin-bottom: 24px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.section-nav a { padding: 8px 12px; border-radius: 7px; color: #40506a; text-decoration: none; font-weight: 700; }
.section-nav a:hover, .section-nav a.active { background: #e6efff; color: #124fcb; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.list-status { color: #66748a; font-size: 14px; }
.list-status.stale { color: #8a5800; font-weight: 700; }
.list-error { margin: 12px 0; padding: 12px 14px; border: 1px solid #e9a6a6; background: #fff5f5; border-radius: 7px; }
.list-actions { display: flex; gap: 10px; margin-top: 18px; }
.resource-list { list-style: none; padding: 0; margin: 0; }
.resource-list li + li { border-top: 1px solid #e5eaf1; }
.resource-list a, .resource-summary { display: flex; flex-direction: column; gap: 5px; padding: 16px 2px; color: #1d2a40; text-decoration: none; }
.resource-list a:hover strong { color: #155eef; }
.resource-list span { color: #66748a; font-size: 14px; }
.history-row { display: flex; align-items: center; gap: 14px; }
.history-row > a:first-child { flex: 1; }
.history-row > .secondary { padding: 7px 11px; min-height: 36px; }
.empty { padding: 28px 0 8px; color: #66748a; }
.empty h3 { color: #28344a; }
.requirement-form { display: grid; gap: 22px; }
.requirement-form label { display: grid; gap: 7px; font-weight: 700; }
.structured-editor { display: grid; gap: 12px; border-top: 1px solid #dce3ec; padding-top: 18px; }
.structured-editor h2 { margin: 0; }
.structured-row { display: grid; gap: 12px; border: 1px solid #dce3ec; border-radius: 8px; padding: 16px; }
.structured-row legend { font-weight: 700; padding: 0 5px; }
.structured-row button { justify-self: start; }
.hint { color: #66748a; font-weight: 400; font-size: 13px; }
input, textarea, select { width: 100%; border: 1px solid #acb8c8; border-radius: 7px; padding: 10px 12px; color: #172033; background: #fff; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus, button:focus, a:focus { outline: 3px solid rgba(21, 94, 239, .25); outline-offset: 2px; }
.form-status { min-height: 0; }
.form-status:not(:empty) { padding: 11px 13px; background: #fff5dc; border: 1px solid #f2d68d; border-radius: 7px; }
.conflict { border: 1px solid #e9a6a6; background: #fff5f5; padding: 18px; border-radius: 8px; }
.badge, .labels span { display: inline-flex; background: #edf1f6; border-radius: 999px; padding: 4px 9px; font-size: 13px; }
.labels { display: flex; flex-wrap: wrap; gap: 7px; margin: -10px 0 20px; }
.markdown { line-height: 1.65; }
.markdown p, .markdown li { max-width: 76ch; }
.muted { color: #718096; }
.provenance { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 10px 18px; }
.provenance dt { font-weight: 700; }
.provenance dd { margin: 0; overflow-wrap: anywhere; }
.diff-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.diff-columns > div, .diff-list li { min-width: 0; padding: 12px; border: 1px solid #dce3ec; border-radius: 7px; }
.diff-columns pre, .diff-list pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-lines { display: grid; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-lines span { padding: 2px 8px; }
.diff-remove { background: #fff0f0; color: #862525; }
.diff-add { background: #ecfaef; color: #1f6a31; }
.diff-list { display: grid; gap: 10px; }
@media (max-width: 720px) { .shell { grid-template-columns: 1fr; } .sidebar { border-right: 0; border-bottom: 1px solid #dce3ec; padding: 14px; } .content { padding-top: 28px; } .page-heading { flex-direction: column; } .user { display: none; } }

.markdown img { max-width: 100%; height: auto; }

/* Hidden retries stay absent until the command state explicitly reveals them. */
[hidden] { display: none !important; }

/* Established develop login, scoped away from the authenticated workspace UI. */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #f6f7fa; color: #1e2a44; font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }
.login-card { width: 100%; max-width: 384px; padding: 32px; border: 1px solid #e1e5ed; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.login-heading { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 32px; }
.login-mark { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 14px; background: linear-gradient(to bottom right, #2d8cff, #125eba); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.login-heading h1 { margin: 0; font-size: 18px; font-weight: 600; line-height: 28px; letter-spacing: -.025em; }
.login-heading h1 span { color: #126ede; }
.login-heading p { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: #626c80; }
.login-google { display: flex; width: 100%; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; border: 1px solid #ccd2de; border-radius: 10px; background: #fff; color: #39435a; font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none; box-shadow: 0 1px 2px rgb(0 0 0 / .05); transition: background-color .15s, border-color .15s; }
.login-google svg { flex-shrink: 0; }
.login-google:hover { border-color: #7f889b; background: #f6f7fa; }
.login-access { margin: 24px 0 0; text-align: center; font-size: 11px; line-height: 16.5px; color: #7f889b; }
