/* axi0 Forms (/forms/): the axi0 family look, as on Tasks, Docs and My search. True black or paper, Instrument Sans, the
   orange core as the page accent; a form's own colour (sw-*) tints its editor and its public page. No inline styles in
   the markup (the page runs under style-src 'self'); bar widths are set through the CSSOM. */
@font-face {
  font-family: "Instrument Sans";
  src: url(/axi0/fonts/instrument-sans-latin-var.woff2) format("woff2");
  font-weight: 400 700;
  font-display: optional;
}
:root {
  --bg: #000; --panel: #0a0a0c; --panel2: #0d0d10; --field: #050506; --hover: #141418; --raise: #18181d;
  --line: #1c1c21; --line2: #2a2a31; --line3: #3a3a42; --field-line: #2a2a31;
  --head: #fff; --text: #d6d6dc; --text2: #c4c4cc; --soft2: #a9a9b3; --lede: #a3a3ad; --mute: #8e8e98; --faint: #868692; --place: #7c7c87;
  --core: #f6a04d; --core-ink: #f6a04d; --core-hover: #ffb26a; --on-core: #000;
  --danger: #ff8f78; --ok: #7fd49a; --uline: rgba(196, 196, 204, .45); --shade: rgba(0, 0, 0, .6);
  --acc: #f6a04d; --acc-ink: #f6a04d;
  color-scheme: dark;
}
html[data-axi0-theme="light"] {
  --bg: #f6f2ea; --panel: #fffdf9; --panel2: #fffdf9; --field: #fffdf9; --hover: #efe8dc; --raise: #ece5d8;
  --line: #e6dfd3; --line2: #d3cabb; --line3: #8a8174; --field-line: #8a8174;
  --head: #17140f; --text: #2c2823; --text2: #3d3730; --soft2: #50483f; --lede: #4f4940; --mute: #675f54; --faint: #675f54; --place: #6f665a;
  --core-ink: #9a4a0a; --danger: #b3261e; --ok: #17733f; --uline: rgba(61, 55, 48, .45); --shade: rgba(40, 30, 20, .45);
  --acc-ink: #9a4a0a;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  html:not([data-axi0-theme="dark"]) {
    --bg: #f6f2ea; --panel: #fffdf9; --panel2: #fffdf9; --field: #fffdf9; --hover: #efe8dc; --raise: #ece5d8;
    --line: #e6dfd3; --line2: #d3cabb; --line3: #8a8174; --field-line: #8a8174;
    --head: #17140f; --text: #2c2823; --text2: #3d3730; --soft2: #50483f; --lede: #4f4940; --mute: #675f54; --faint: #675f54; --place: #6f665a;
    --core-ink: #9a4a0a; --danger: #b3261e; --ok: #17733f; --uline: rgba(61, 55, 48, .45); --shade: rgba(40, 30, 20, .45);
    --acc-ink: #9a4a0a;
    color-scheme: light;
  }
}
/* a form's colour: --acc fills (black text on it in both themes, >= 6.8:1), --acc-ink text on the page (>= 5.8:1) */
.sw-core { --acc: #f6a04d; --acc-ink: #f6a04d; }
.sw-teal { --acc: #3ec7b7; --acc-ink: #5fd6c8; }
.sw-blue { --acc: #6aa8ff; --acc-ink: #8dbdff; }
.sw-violet { --acc: #b59cff; --acc-ink: #c4b0ff; }
.sw-rose { --acc: #ff8fb1; --acc-ink: #ffa6c1; }
.sw-green { --acc: #7fd49a; --acc-ink: #7fd49a; }
html[data-axi0-theme="light"] .sw-core { --acc-ink: #9a4a0a; }
html[data-axi0-theme="light"] .sw-teal { --acc: #2bb3a3; --acc-ink: #0f6b62; }
html[data-axi0-theme="light"] .sw-blue { --acc: #5b9bf5; --acc-ink: #1f5bb5; }
html[data-axi0-theme="light"] .sw-violet { --acc: #9d84f0; --acc-ink: #5b3fb5; }
html[data-axi0-theme="light"] .sw-rose { --acc: #f0789f; --acc-ink: #a8285a; }
html[data-axi0-theme="light"] .sw-green { --acc: #4fbf73; --acc-ink: #17733f; }
@media (prefers-color-scheme: light) {
  html:not([data-axi0-theme="dark"]) .sw-core { --acc-ink: #9a4a0a; }
  html:not([data-axi0-theme="dark"]) .sw-teal { --acc: #2bb3a3; --acc-ink: #0f6b62; }
  html:not([data-axi0-theme="dark"]) .sw-blue { --acc: #5b9bf5; --acc-ink: #1f5bb5; }
  html:not([data-axi0-theme="dark"]) .sw-violet { --acc: #9d84f0; --acc-ink: #5b3fb5; }
  html:not([data-axi0-theme="dark"]) .sw-rose { --acc: #f0789f; --acc-ink: #a8285a; }
  html:not([data-axi0-theme="dark"]) .sw-green { --acc: #4fbf73; --acc-ink: #17733f; }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 15px/1.55 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--core-ink); text-underline-offset: 3px; }
::selection { background: rgba(246, 160, 77, .35); }
[hidden] { display: none !important; }
.is-locked .when-unlocked, .is-unlocked .when-locked { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: 999px; background: var(--core); color: var(--on-core); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--core-ink); outline-offset: 2px; }

/* ---- header (launcher.css sets the shared geometry) ---------------------------------------------------------------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1080px; margin: 0 auto; padding: 22px 20px 8px; }
.mark { display: inline-flex; align-items: baseline; gap: .12em; color: var(--head); text-decoration: none; font-size: 26px; font-weight: 600; letter-spacing: -.045em; white-space: nowrap; }
.mark-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--core); box-shadow: 0 0 9px var(--core); transform: translateY(-2px); }
.mark-s { color: var(--mute); font-weight: 500; }
.top-right { display: flex; align-items: center; gap: 14px; }
.me-slot { position: relative; flex: none; width: 36px; height: 36px; }
.me-slot:empty { display: none; }

/* ---- layout --------------------------------------------------------------------------------------------------------- */
main { max-width: 1080px; margin: 0 auto; padding: 4px 20px 24px; }
h1 { margin: 22px 0 8px; color: var(--head); font-size: clamp(32px, 5vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.lede { max-width: 50em; margin: 0; color: var(--lede); }
.is-unlocked h1, .has-forms h1 { margin-top: 12px; font-size: 30px; }
.is-unlocked .lede, .has-forms .lede { font-size: 14px; }
.card { margin-top: 18px; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); min-width: 0; }
h2 { margin: 0 0 12px; color: var(--head); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; color: var(--head); font-size: 15px; font-weight: 600; }
.card > p { margin: 0 0 10px; }
.mode { margin: 14px 0 0; color: var(--lede); font-size: 14px; }
.linkish { padding: 0; border: 0; background: none; color: var(--core-ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--head); }

/* ---- form controls --------------------------------------------------------------------------------------------------- */
label { display: block; margin: 14px 0 6px; color: var(--head); font-size: 14px; }
label.inline { display: inline; margin: 0; color: var(--text); font-size: 13.5px; }
:where(input[type="text"], input[type="number"], input[type="datetime-local"], input[type="date"], textarea, select) {
  width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--field-line); border-radius: 12px;
  background: var(--field); color: var(--head); font: inherit; font-size: 15px;
}
textarea { resize: vertical; line-height: 1.5; }
:where(select) { width: auto; min-width: 110px; }
input::placeholder, textarea::placeholder { color: var(--place); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--core); box-shadow: 0 0 0 3px rgba(246, 160, 77, .18); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; color: var(--head); font-size: 14px; }
.hint { margin: 6px 0 0; color: var(--mute); font-size: 13px; }
.error { margin: 6px 0 0; color: var(--danger); font-size: 13px; }
.error:empty, .note:empty, .hint:empty { display: none; }
.note { margin: 8px 0 0; color: var(--core-ink); font-size: 13px; }
.warn { color: var(--head); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.row.tight { flex-wrap: nowrap; margin-top: 0; }
.row.tight input { flex: 1 1 auto; min-width: 0; }
.grow { flex: 1 1 auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; margin: 0;
  border: 1px solid var(--line2); border-radius: 999px; background: var(--panel); color: var(--head); font: inherit; font-size: 14px;
  white-space: nowrap; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: rgba(246, 160, 77, .7); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { border-color: var(--core); background: var(--core); color: var(--on-core); font-weight: 600; }
.btn.primary:hover { background: var(--core-hover); }
.view[class*="sw-"] .btn.primary { border-color: var(--acc); background: var(--acc); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.btn.file:focus-within { outline: 2px solid var(--core-ink); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--core); }
.icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--soft2); cursor: pointer; }
.icon:hover { background: var(--hover); color: var(--head); }
.icon svg { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border: 1px solid var(--line2); border-radius: 999px; color: var(--text); font-size: 12px; font-weight: 600; }
.pill.open { border-color: var(--ok); color: var(--ok); }
.pill.closed { color: var(--mute); }
.pill.draft { color: var(--text); }

/* ---- the Key -------------------------------------------------------------------------------------------------------- */
.key .new { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.key .new p { margin: 0 0 12px; }
.keytext { margin: 10px 0 0; padding: 14px 16px; border: 1px dashed rgba(246, 160, 77, .55); border-radius: 12px; background: rgba(246, 160, 77, .05);
  color: var(--head); font: 15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }

/* ---- the list -------------------------------------------------------------------------------------------------------- */
.view { margin-top: 18px; min-width: 0; }
.view-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; }
.view-top h2 { margin: 0; }
.ans-h { min-width: 0; overflow-wrap: anywhere; }
.forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.fcard { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-top: 4px solid var(--acc); border-radius: 18px; background: var(--panel); }
.fc-t { margin: 0 0 6px; font-size: 17px; overflow-wrap: anywhere; }
.fc-t a { color: var(--head); text-decoration: none; }
.fc-t a:hover { text-decoration: underline; }
.fc-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; color: var(--mute); font-size: 13px; }
.fc-a { display: flex; gap: 8px; margin: 12px 0 0; }
.empty { margin: 14px 2px 0; color: var(--mute); font-size: 14px; }
.how dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0; }
.how dt { color: var(--head); font-weight: 600; }
.how dd { margin: 0; color: var(--text); }

/* ---- the editor ---------------------------------------------------------------------------------------------------- */
.pub { border-top: 4px solid var(--acc); }
.pub > p { margin: 0; }
.pub-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; }
.pub-row .hint { margin: 0; }
.ed-head .fld:first-child label { margin-top: 0; }
#ed-title { font-size: 20px; font-weight: 600; }
.colors { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; }
.colors legend { margin-bottom: 8px; }
.color { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; }
.color input { width: 16px; height: 16px; margin: 0; accent-color: var(--acc); }
.sw { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--acc); }
.sect { border-left: 4px solid var(--acc); }
.sect-top { display: flex; align-items: center; gap: 8px; }
.sect-h { flex: 1 1 auto; margin: 0; color: var(--acc-ink); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.acts { display: inline-flex; align-items: center; gap: 0; margin-left: auto; }
.qs { margin: 10px 0 0; padding: 0; list-style: none; }
.q { margin: 0 0 12px; padding: 12px 14px 14px; border: 1px solid var(--line2); border-radius: 16px; background: var(--panel2); min-width: 0; }
.q-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.q-n { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--acc); color: #000; font-size: 13px; font-weight: 700; }
.q-top select { min-height: 36px; padding: 5px 10px; font-size: 14px; }
.q .fld label { margin-top: 10px; }
.opts { margin-top: 10px; }
.opts-h { margin: 0 0 6px; color: var(--head); font-size: 14px; }
.opt-list { margin: 0 0 8px; padding: 0; list-style: none; }
.opt { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.opt input { flex: 1 1 auto; min-width: 0; min-height: 38px; }
.opt-m { flex: none; width: 16px; height: 16px; border: 2px solid var(--line3); border-radius: 50%; }
.opt-m.check { border-radius: 4px; }
.opt-m.drop { width: 10px; height: 10px; border: 0; border-radius: 0; background: var(--line3); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.fgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrid select { width: 100%; }
.add-q { margin-top: 6px; }
.add-q select { min-height: 40px; }
#add-s { margin-top: 14px; }
.settings h3 { margin-bottom: 0; }

/* ---- answers ------------------------------------------------------------------------------------------------------- */
.ans-meta { margin: 8px 0 0; color: var(--mute); font-size: 13.5px; }
.tabs { display: flex; gap: 6px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] { min-height: 40px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--acc); color: var(--head); font-weight: 600; }
.sum h3 { overflow-wrap: anywhere; }
.bars { margin: 10px 0 0; padding: 0; list-style: none; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; margin: 0 0 10px; }
.bar-l { color: var(--head); overflow-wrap: anywhere; }
.bar-row.is-old .bar-l { color: var(--mute); }
.bar-n { color: var(--mute); font-size: 13px; }
.bar { grid-column: 1 / -1; display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--line); }
.bar-f { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--acc); }
.cols { display: block; width: 100%; max-width: 520px; height: auto; margin-top: 10px; }
.cols .col { fill: var(--acc); }
.cols .col-n { fill: var(--head); font-size: 12px; font-weight: 600; }
.cols .col-l { fill: var(--mute); font-size: 11px; }
.stat { margin: 6px 0 0; color: var(--text); font-size: 14px; }
.texts, .files { margin: 10px 0 8px; padding: 0; list-style: none; }
.texts li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.texts li:last-child { border-bottom: 0; }
.tn { flex: none; color: var(--mute); font-size: 12.5px; }
.tt { min-width: 0; color: var(--head); white-space: pre-wrap; overflow-wrap: anywhere; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--mute); font-size: 13px; }
.table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th, .grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { position: sticky; top: 0; background: var(--panel2); color: var(--head); font-weight: 600; white-space: nowrap; }
.grid td { max-width: 320px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.grid tbody th { color: var(--mute); font-weight: 500; }
.grid .nw { white-space: nowrap; }

/* ---- dialog, status, footer ---------------------------------------------------------------------------------------- */
.dialog { width: min(440px, calc(100vw - 32px)); margin: auto; padding: 20px 22px 18px; border: 1px solid var(--line2); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.dialog::backdrop { background: var(--shade); }
.dlg-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.sync { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 16px 0 0; color: var(--mute); font-size: 13px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line3); flex: none; }
.sync:empty::before { display: none; }
.sync.is-ok::before { background: var(--core); box-shadow: 0 0 7px rgba(246, 160, 77, .8); }
.sync.is-bad { color: var(--danger); }
.sync.is-bad::before { background: var(--danger); }
.foot { max-width: 1080px; margin: 0 auto; padding: 4px 20px 44px; color: var(--faint); font-size: 12.5px; }
.foot p { margin: 0 0 6px; max-width: 60em; }
.foot a { color: var(--text2); text-decoration: underline; text-decoration-color: var(--uline); }
.locker { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.locker .btn { min-height: 36px; font-size: 13px; }

@media (max-width: 760px) {
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .how dd { margin-bottom: 10px; }
}
@media (max-width: 600px) {
  .top { flex-wrap: wrap; gap: 4px 12px; padding: 16px 16px 2px; }
  .mark { margin-right: auto; font-size: 22px; }
  .top-right { display: contents; }
  main { padding: 0 14px 20px; }
  .card { padding: 18px 16px 20px; border-radius: 18px; }
  .key .row.tight { flex-wrap: wrap; }
  .key .row.tight input { flex-basis: 100%; }
  .pub .row.tight { flex-wrap: wrap; }
  .pub .row.tight input { flex-basis: 100%; }
  .fgrid.two { grid-template-columns: minmax(0, 1fr); }
  .q { padding: 10px 10px 12px; }
  .foot { padding: 4px 16px 36px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
