:root {
  color-scheme: light;
  --paper: #f5f7fc;
  --ink: #162849;
  --muted: #465777;
  --brand: #2146c6;
  --brand-deep: #173495;
  --line: #c9d2e4;
  --wash: #eaf0ff;
  --danger: #8c243a;
  font: 16px/1.53 "Aptos", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner, main { width: min(1050px, calc(100% - 2rem)); margin-inline: auto; }
.top-inner { height: 4.5rem; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 780; font-size: 1.25rem; display: flex; align-items: center; gap: .65rem; }
.mark { background: var(--brand); color: #fff; width: 2rem; height: 2rem; border-radius: .65rem; display: grid; place-items: center; }
.help { font-weight: 650; color: var(--brand-deep); text-underline-offset: .22em; }
main { padding: clamp(2rem, 6vw, 4rem) 0 3rem; }
.intro { margin-bottom: 1.8rem; }
.eyebrow { color: var(--brand-deep); font-weight: 760; font-size: .88rem; letter-spacing: .125em; margin: 0 0 .35rem; }
h1 { font-family: Georgia, serif; font-weight: 600; font-size: clamp(2.1rem, 6vw, 3.5rem); letter-spacing: -.05em; line-height: 1.03; margin: 0; }
.intro p:last-child { color: var(--muted); max-width: 39rem; margin-bottom: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(240px, 1fr); gap: 1.2rem; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.6rem); min-width: 0; }
.sidebar { background: #edf2ff; }
h2 { font-size: 1.14rem; margin: 0 0 .45rem; line-height: 1.3; }
.sidebar p { color: var(--muted); margin: .25rem 0 1rem; }
nav, .switch { display: flex; gap: .35rem; flex-wrap: wrap; }
nav { border-bottom: 1px solid var(--line); padding-bottom: .85rem; margin-bottom: 1rem; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--brand-deep); border-radius: .55rem; padding: .5rem .75rem; font-weight: 660; }
button:hover { border-color: var(--brand); background: #f4f7ff; }
button:disabled { cursor: wait; opacity: .63; }
button.active, button[aria-pressed="true"] { background: var(--wash); color: var(--brand-deep); border-color: #9caff7; }
button.cta { color: #fff; background: var(--brand); border-color: var(--brand); justify-self: start; }
button.cta:hover { background: var(--brand-deep); }
form, #share-settings, fieldset { display: grid; gap: .9rem; }
label, legend { display: block; font-size: .92rem; font-weight: 650; min-width: 0; }
label > :is(input:not([type="checkbox"]),select,textarea) { margin-top: .3rem; }
input:not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: .5rem; color: var(--ink); background: #fff; padding: .55rem .65rem; }
textarea { display: block; resize: vertical; }
input[type="file"] { display: block; }
.joined { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; margin-top: -.6rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.check { display: flex; align-items: start; gap: .5rem; font-weight: 550; }
.check input { accent-color: var(--brand); width: 1.08rem; height: 1.08rem; margin-top: .2rem; flex: none; }
.hint { color: var(--muted); font-weight: 480; }
fieldset { margin: 0; border: 1px solid var(--line); padding: .7rem .75rem; border-radius: .65rem; min-width: 0; }
:is(a,button,input,textarea,select):focus-visible { outline: 3px solid #4269e7; outline-offset: 2px; }
.notice, .result { background: var(--wash); border: 1px solid #afbef3; padding: .9rem; border-radius: .65rem; overflow-wrap: anywhere; }
.result { margin-top: 1rem; }
.result input { font: .9rem/1.4 ui-monospace, monospace; margin-bottom: .3rem; }
.result pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: .8rem 0; font: .94rem/1.4 ui-monospace, monospace; }
.link-group { margin: .7rem 0; }
.link-group:last-child { margin-bottom: 0; }
#status:empty, #vault-status:empty, .items:empty { display: none; }
[data-error="true"] { color: var(--danger) !important; }
.items { list-style: none; padding: 0; margin-bottom: 0; }
.items li { border-top: 1px solid var(--line); padding: .7rem 0; overflow-wrap: anywhere; }
.items li div { display: flex; gap: .4rem; margin-top: .4rem; flex-wrap: wrap; }
.docs { max-width: 48rem; }
.docs ul { padding-left: 1.3rem; }
@media (max-width: 740px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .fields { grid-template-columns: 1fr; } .joined { grid-template-columns: 1fr; } .joined button { justify-self: start; } }
