:root { color-scheme: light; --bg: #f7f7f2; --surface: #fffffc; --muted-surface: #eceee6; --text: #242e28; --muted: #626d65; --line: #d9dfd4; --accent: #245c46; --accent-soft: #e5eddf; --danger: #a83632; --shadow: 0 12px 44px #293a2510; }
:root[data-theme="dark"] { color-scheme: dark; --bg: #181e1a; --surface: #1e2621; --muted-surface: #28312a; --text: #e3e9df; --muted: #a2b19f; --line: #38453a; --accent: #b0cda3; --accent-soft: #303e2c; --danger: #ffa9a1; --shadow: 0 12px 44px #07100620; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; min-height: 100dvh; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif; font-size: clamp(34px, 3.3vw, 54px); line-height: 1.1; font-weight: 400; letter-spacing: -.045em; margin-bottom: 0; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
h3 { font-size: 16px; margin-bottom: 4px; }
p { max-width: 66ch; }
small { color: var(--muted); font-size: 12px; }
.eyebrow { display: block; color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link { position: fixed; top: -80px; left: 15px; padding: 10px 16px; background: var(--surface); z-index: 20; }
.skip-link:focus { top: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand strong { font-size: 16px; font-weight: 600; letter-spacing: -.03em; }
.brand-mark { font-family: Georgia, serif; font-size: 31px; line-height: 1; color: var(--surface); background: var(--accent); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; padding-bottom: 4px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 80px; padding: 14px 36px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.workspace-nav { display: flex; gap: 6px; margin-right: auto; margin-left: 32px; }
.workspace-nav button { border: 0; color: var(--muted); background: transparent; border-radius: 6px; padding: 9px 16px; }
.workspace-nav button.active, .workspace-nav button:hover { background: var(--accent-soft); color: var(--accent); }
.top-actions, .form-actions, .dialog-actions, .token-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ghost-button, .account-button, .primary-button, .danger-button { min-height: 40px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line); color: var(--text); background: var(--surface); font-weight: 500; }
.ghost-button:hover, .account-button:hover { background: var(--muted-surface); }
.account-button { border-radius: 24px; background: var(--accent-soft); color: var(--accent); }
.top-actions .icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 10px; flex: 0 0 42px; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sun-icon, :root[data-theme="dark"] .moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: block; }
.project-description { margin-top: 22px; }
textarea { border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; background: var(--surface); color: var(--text); resize: vertical; width: 100%; }
#projectConventions .form-grid { margin-top: 22px; }
#projectList .person-main p { margin: 8px 0 0; overflow-wrap: anywhere; }
.primary-button { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.primary-button:hover { filter: brightness(.9); }
.danger-button { color: var(--danger); background: transparent; }
.danger-button:hover { border-color: var(--danger); }
input:not([type="checkbox"]), select { border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; background: var(--surface); color: var(--text); min-width: 0; }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 500; }
fieldset { border: 1px solid var(--line); padding: 16px; margin: 24px 0; border-radius: 6px; min-width: 0; }
legend { color: var(--muted); font-size: 12px; padding: 0 8px; }
.workspace-heading { padding: 40px 36px 32px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: end; }
.controls select { max-width: 280px; }
.label { font-size: 12px; color: var(--muted); }
.layout { border-top: 1px solid var(--line); display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { border-right: 1px solid var(--line); padding: 25px 20px; position: sticky; top: 80px; height: calc(100dvh - 80px); align-self: start; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sidebar-header { font-size: 13px; font-weight: 600; }
.count-pill { color: var(--muted); font: 12px ui-monospace, monospace; }
#pageFilter { width: 100%; font-size: 13px; }
#pageList { list-style: none; margin: 16px -8px 0; padding: 0; max-height: calc(100dvh - 228px); overflow: auto; scrollbar-width: thin; }
#pageList button { text-align: left; border: 0; border-radius: 5px; width: 100%; padding: 12px; background: transparent; color: var(--text); display: grid; gap: 3px; }
#pageList button:hover { background: var(--muted-surface); }
#pageList button.active { background: var(--accent-soft); color: var(--accent); }
.page-title { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.page-path, .mono { font: 11px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.content { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px 36px; padding: 30px 40px 72px; max-width: 1320px; width: 100%; margin: 0 auto; align-items: start; align-content: start; }
#status { grid-column: 1/-1; font: 11px/1.6 ui-monospace, monospace; color: var(--muted); min-height: 22px; overflow-wrap: anywhere; }
[role="status"][data-kind="error"], #loginStatus, #userFormStatus, #passwordStatus, #consentStatus { color: var(--danger); }
.toc { grid-column: 2; grid-row: 2; border-left: 1px solid var(--line); padding-left: 18px; font-size: 12px; position: sticky; top: 110px; max-height: calc(100dvh - 140px); overflow: auto; }
.toc strong { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 14px 0; }
.toc li { margin: 10px 0; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--accent); }
.toc-h3 { padding-left: 10px; }
.markdown-body { background: transparent !important; color: var(--text) !important; grid-column: 1; grid-row: 2; min-width: 0; font-family: inherit; line-height: 1.75; font-size: 15px; }
.markdown-body:empty { display: none; }
.markdown-body h1 { font-family: "Iowan Old Style", Georgia, serif; font-size: 36px; font-weight: 400; letter-spacing: -.04em; border: 0; }
.markdown-body h2, .markdown-body h3 { letter-spacing: -.02em; }
.markdown-body a { color: var(--accent); }
.markdown-body pre { background: var(--muted-surface); border-radius: 6px; }
.markdown-body table { width: 100%; overflow: auto; display: block; }
.markdown-body table tr { background: transparent; }
.markdown-body table tr:nth-child(2n) { background: var(--muted-surface); }
.markdown-body table td, .markdown-body table th { border-color: var(--line); }
.page-metadata { margin: 0 0 30px; border-bottom: 1px solid var(--line); padding-bottom: 14px; color: var(--muted); font-size: 12px; }
.page-metadata summary { cursor: pointer; }
.page-metadata table { margin-top: 16px; }
.management { max-width: 1240px; margin: 0 auto; padding: 0 36px 72px; }
.management .workspace-heading { padding-right: 0; padding-left: 0; }
.section-intro { color: var(--muted); margin-bottom: 30px; }
.narrow { max-width: 800px; }
.panel { background: var(--surface); padding: 28px; border: 1px solid var(--line); border-radius: 8px; margin: 24px 0; }
.panel > summary { font-weight: 600; cursor: pointer; }
.panel[open] > summary { margin-bottom: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.panel-heading h2 { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grant-grid { display: grid; gap: 4px; }
.grant-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.grant-row:last-child { border-bottom: 0; }
.project-choice, .write-choice { display: flex; align-items: center; gap: 10px; }
.project-choice small, .project-choice strong { display: block; }
.project-choice strong { font-weight: 500; }
.write-choice { white-space: nowrap; color: var(--muted); font-size: 12px; }
.token-card, .person-row { border-top: 1px solid var(--line); padding: 24px 0; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.token-main, .person-main { min-width: 0; }
.token-title-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.token-title-row h3 { margin: 0; }
.token-meta { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; margin: 8px 0; }
.token-grants { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; background: var(--muted-surface); color: var(--muted); padding: 3px 8px; border-radius: 4px; font-size: 11px; }
.badge.success, .badge.admin { background: var(--accent-soft); color: var(--accent); }
.revoked { opacity: .65; }
.hero-stat { display: grid; text-align: right; color: var(--muted); font-size: 12px; }
.hero-stat strong { font-family: Georgia, serif; font-size: 38px; font-weight: 400; color: var(--accent); }
.empty-state { padding: 24px 12px; color: var(--muted); }
#passwordForm label { margin: 20px 0; }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 32px; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; }
dialog::backdrop { background: #18231dbb; backdrop-filter: blur(3px); }
.dialog-actions { margin-top: 24px; }
#secretValue { display: block; padding: 16px; background: var(--muted-surface); overflow-wrap: anywhere; user-select: all; }
.login-layout { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100dvh; }
.login-story { background: var(--accent-soft); padding: 40px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-story::after { content: ''; position: absolute; width: 420px; height: 420px; border: 1px solid var(--line); border-radius: 50%; right: -250px; bottom: -170px; box-shadow: 0 0 0 40px var(--accent-soft), 0 0 0 41px var(--line), 0 0 0 80px var(--accent-soft), 0 0 0 81px var(--line); pointer-events: none; }
.login-editorial { margin: auto 0; padding: 70px 0; position: relative; z-index: 1; }
.login-editorial h1 { font-size: clamp(44px, 4.8vw, 76px); line-height: 1.06; }
.login-editorial h1 em { color: var(--accent); font-weight: 400; }
.login-editorial p { color: var(--muted); font-size: 16px; max-width: 35ch; margin: 30px 0 0; }
.login-foot { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.login-panel { display: grid; place-items: center; padding: 48px; background: var(--surface); }
.login-form { width: min(100%, 360px); }
.login-form h2 { font-family: "Iowan Old Style", Georgia, serif; font-size: 42px; font-weight: 400; letter-spacing: -.04em; margin-bottom: 12px; }
.login-form > p { color: var(--muted); margin-bottom: 30px; }
.login-form label { margin-top: 22px; }
.login-form .primary-button { width: 100%; display: flex; justify-content: space-between; margin: 20px 0 24px; padding: 13px 18px; }
.login-form > small { display: block; line-height: 1.7; }
.login-form #loginStatus { color: var(--danger); font-size: 13px; margin: 16px 0 0; }
@media (min-width: 1600px) { #workspace { max-width: 1660px; margin: auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
@media (max-width: 1150px) { .content { grid-template-columns: minmax(0, 1fr); padding: 28px; } .toc { position: static; grid-column: 1; grid-row: 3; } .controls { max-width: 360px; } .login-story { padding: 36px; } }
@media (max-width: 800px) { .topbar { padding: 12px 18px; gap: 14px; flex-wrap: wrap; } .workspace-nav { margin: 0; order: 3; width: 100%; } .top-actions { margin-left: auto; } .top-actions .ghost-button { padding: 8px; font-size: 12px; } .workspace-heading { padding: 28px 20px; flex-wrap: wrap; } .controls { justify-content: start; max-width: 100%; } .layout { grid-template-columns: 220px minmax(0, 1fr); } .sidebar { top: 126px; height: calc(100dvh - 126px); padding: 20px 12px; } .content { padding: 24px 20px; } .management { padding: 0 20px 48px; } .token-card, .person-row { flex-direction: column; align-items: start; gap: 16px; } .login-layout { grid-template-columns: 1fr; } .login-story { padding: 24px; } .login-editorial { padding: 40px 0; } .login-editorial h1 { font-size: 48px; } .login-editorial h1 br { display: none; } .login-editorial p, .login-foot { display: none; } .login-panel { padding: 40px 24px 64px; } }
@media (max-width: 580px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; } #pageList { max-height: 190px; } .content { padding: 24px 20px 48px; } .form-grid { grid-template-columns: 1fr; } .panel { padding: 20px; } .grant-row { align-items: start; flex-wrap: wrap; gap: 10px; } .controls select { max-width: 230px; } .login-editorial h1 { font-size: 39px; } .brand strong { font-size: 14px; } .account-button { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@media (max-width: 580px) { .topbar .brand strong { display: none; } .controls { display: grid; grid-template-columns: auto minmax(0, 1fr); width: 100%; } .controls select { max-width: 100%; width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
