@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=IBM+Plex+Mono:wght@400;500&family=Source+Sans+3:wght@400;600;700&display=swap');

:root { --ink: #1e211f; --paper: #f4f0e8; --moss: #3e6650; --brick: #b6533b; --ochre: #d7a84b; --line: rgba(30,33,31,.18); --muted: #6e716c; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Source Sans 3', Georgia, serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(230px, 29vw) 1fr; }
.rail { position: sticky; top: 0; height: 100vh; padding: 34px clamp(24px, 4vw, 68px); display: flex; flex-direction: column; background: var(--ink); color: var(--paper); overflow: hidden; }
.rail::after { content: ''; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(215,168,75,.45); border-radius: 50%; right: -100px; bottom: 18%; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--paper); text-decoration: none; font-size: 14px; line-height: 1.05; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--ochre); color: var(--ochre); font-family: 'IBM Plex Mono', monospace; font-size: 11px; }
.rail-copy { margin-top: 18vh; max-width: 260px; }
.rail h1 { margin: 10px 0 20px; color: var(--ochre); font: 52px/1 'DM Serif Display', Georgia, serif; font-weight: 400; }
.rail p { color: rgba(244,240,232,.72); line-height: 1.75; }
.kicker { margin: 0; color: var(--moss); font: 11px/1.3 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; }
.rail .kicker { color: var(--ochre); }
.rail-nav { display: grid; gap: 10px; margin-top: auto; position: relative; z-index: 1; }
.rail-nav a, .back-link { color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(244,240,232,.25); padding: 7px 0; }
.rail-nav a:hover, .back-link:hover { color: var(--ochre); border-color: var(--ochre); }
.back-link { margin-top: 30px; font-size: 14px; }
.content { padding: 54px clamp(24px, 7vw, 120px) 100px clamp(24px, 6vw, 96px); max-width: 1100px; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
h2, h3, h4 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; }
h2 { margin: 10px 0 0; font-size: clamp(38px, 6vw, 72px); line-height: .98; max-width: 620px; }
h3 { margin: 8px 0 0; font-size: 36px; }
h4 { margin: 0 0 20px; font-size: 31px; }
.login-button, .primary-button { border: 0; background: var(--brick); color: var(--paper); padding: 13px 20px; font-weight: 700; }
.login-button:hover, .primary-button:hover { background: var(--moss); }
.notice { min-height: 36px; padding: 13px 0; color: var(--moss); }
.notice.error, .error-text { color: var(--brick); }
.section-block { position: relative; margin-top: 54px; padding: 32px; border: 1px solid var(--line); background: rgba(255,255,255,.28); }
.section-block:nth-of-type(odd) { margin-left: clamp(0px, 4vw, 70px); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.mono-label, .public-mark { color: var(--moss); font: 11px 'IBM Plex Mono', monospace; letter-spacing: .08em; }
.public-mark { color: var(--brick); }
.profile-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px 24px; align-items: end; }
.field-group { display: grid; gap: 7px; }
.field-group label { font-weight: 700; }
input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 10px 0; outline: 0; }
input:focus { border-color: var(--moss); box-shadow: 0 2px 0 var(--moss); }
.visibility-toggle { align-self: center; white-space: nowrap; color: var(--moss); font-size: 14px; }
.visibility-toggle input, .choice-row input { width: auto; accent-color: var(--moss); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding-top: 12px; }
.form-status, .muted, .section-note { color: var(--muted); }
.section-note { margin: -12px 0 22px; line-height: 1.6; }
.public-profile { border-left: 4px solid var(--ochre); padding: 8px 0 8px 24px; }
.public-field { margin: 18px 0; }
.public-field p { margin: 6px 0 0; color: var(--muted); }
.directory-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.directory-item { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; padding: 15px 0; border-bottom: 1px solid var(--line); }
.directory-item:hover strong { color: var(--brick); }
.directory-item span { color: var(--muted); text-align: right; }
.text-button, .secondary-button { border: 1px solid var(--moss); background: transparent; color: var(--moss); padding: 8px 13px; }
.text-button:hover, .secondary-button:hover { background: var(--moss); color: var(--paper); }
.agent-form { display: grid; gap: 18px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 16px 24px; color: var(--muted); }
.choice-row label { display: inline-flex; gap: 7px; align-items: center; }
.token-once { display: grid; gap: 12px; margin-top: 22px; padding: 18px; background: var(--ink); color: var(--paper); }
.token-once code { overflow-wrap: anywhere; color: var(--ochre); font: 14px 'IBM Plex Mono', monospace; }
.token-list { margin-top: 28px; }
.token-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.token-row div { display: grid; gap: 4px; }.token-row span { color: var(--muted); font-size: 14px; }
.danger-button { border: 1px solid var(--brick); background: transparent; color: var(--brick); padding: 7px 12px; }.danger-button:disabled { opacity: .5; cursor: not-allowed; }
.login-modal { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(30,33,31,.72); }.login-modal[hidden], .public-preview[hidden] { display: none; }
.login-dialog { position: relative; width: min(400px, 100%); padding: 34px; background: var(--paper); }.login-dialog h2 { font-size: 42px; }.login-status { color: var(--muted); }.login-qrcode { display: block; width: 240px; height: 240px; margin: 20px auto; }.login-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--ink); font-size: 26px; }.login-dialog .secondary-button { margin-top: 12px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 8; transform: translateY(20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 13px 17px; transition: .2s ease; }.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 760px) { .page-shell { display: block; }.rail { position: relative; height: auto; min-height: 330px; padding: 25px; }.rail-copy { margin-top: 50px; }.rail h1 { font-size: 44px; }.rail-nav { display: flex; flex-wrap: wrap; margin-top: 30px; gap: 16px; }.rail-nav a { border-bottom: 0; }.back-link { position: absolute; top: 25px; right: 25px; margin: 0; }.content { padding: 34px 20px 70px; }.topbar { align-items: start; flex-direction: column; }.section-block, .section-block:nth-of-type(odd) { margin-left: 0; padding: 22px 18px; }.profile-form { display: block; }.field-group { margin-top: 18px; }.visibility-toggle { display: block; margin: 8px 0 20px; }.directory-list { grid-template-columns: 1fr; }.section-heading { flex-direction: column; }.token-row { align-items: start; flex-direction: column; } }
