/* axi0 Notes (/notes/): the axi0 family look, as on My search. True black, Instrument Sans, the orange core as the one
   accent. No inline styles in the markup (the page runs under style-src 'self'). */
@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 {
  --core: #f6a04d; --ink: #f5f5f7; --text: #d6d6dc; --mute: #8e8e98; --line: #1c1c21; --line2: #2a2a31;
  --panel: #0a0a0c; --hover: #141418; --danger: #ff8f78;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: #000; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: #000;
  font: 15px/1.55 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--core); 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: #000; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--core); outline-offset: 2px; }

/* ---- header ------------------------------------------------------------------------------------------------- */
.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: #fff; 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-nav { display: flex; gap: 20px; }
.top-nav a { color: #b4b4bd; text-decoration: none; font-size: 14px; }
.top-nav a:hover { color: #fff; text-decoration: underline; }

/* ---- layout ------------------------------------------------------------------------------------------------- */
main { max-width: 1080px; margin: 0 auto; padding: 4px 20px 24px; }
h1 { margin: 22px 0 8px; color: #fff; font-size: clamp(32px, 5vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.lede { max-width: 46em; margin: 0; color: #a3a3ad; }
.is-unlocked h1 { margin-top: 12px; font-size: 30px; }
.is-unlocked .lede { font-size: 14px; }
.card { margin-top: 18px; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
h2 { margin: 0 0 12px; color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
h3 { margin: 22px 0 6px; color: #fff; font-size: 15px; font-weight: 600; }
.card > p { margin: 0 0 10px; }
.facts { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; color: #a3a3ad; font-size: 14px; }
.facts li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.facts strong { display: block; margin-bottom: 4px; color: #fff; font-weight: 600; }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---- form controls ------------------------------------------------------------------------------------------- */
label { display: block; margin: 16px 0 6px; color: #fff; font-size: 14px; }
label.inline { display: inline; margin: 0; color: var(--text); }
input[type="text"], input[type="search"], textarea, select {
  width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line2); border-radius: 12px;
  background: #050506; color: #fff; font: inherit; font-size: 15px;
}
select { width: auto; min-width: 120px; }
input::placeholder, textarea::placeholder { color: #7c7c87; }
input[type="text"]:focus, input[type="search"]:focus, select:focus { outline: none; border-color: var(--core); box-shadow: 0 0 0 3px rgba(246, 160, 77, .18); }
.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 { display: none; }
.note { margin: 8px 0 0; color: var(--core); font-size: 13px; }
.warn { color: #fff; }
.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; }
.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: #fff; font: inherit; font-size: 14px;
  white-space: nowrap; cursor: pointer; 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: #000; font-weight: 600; }
.btn.primary:hover { background: #ffb26a; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.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); 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: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: #a9a9b3; cursor: pointer; }
.icon:hover { background: var(--hover); color: #fff; }
.icon:disabled { opacity: .35; cursor: default; background: none; }
.icon svg { width: 19px; height: 19px; }
.icon[aria-pressed="true"] { color: var(--core); }

/* ---- the Key ---------------------------------------------------------------------------------------------- */
.key .new { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.key .new h3 { margin-top: 0; }
.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: #fff; font: 15px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }

/* ---- the app: list + editor ------------------------------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.side, .editor { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.side { display: flex; flex-direction: column; min-height: 62vh; max-height: 74vh; padding: 14px 12px; }
.side-top { display: flex; flex-direction: column; gap: 10px; padding: 0 2px 10px; border-bottom: 1px solid var(--line); }
.notes { flex: 1 1 auto; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.note-btn {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.note-btn:hover { background: var(--hover); }
.note-btn[aria-current="true"] { background: rgba(246, 160, 77, .1); box-shadow: inset 2px 0 0 var(--core); }
.nt { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.nt-t { overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pinned { flex: none; color: var(--core); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.nm { display: block; margin-top: 1px; color: var(--mute); font-size: 12.5px; }
.ns { display: -webkit-box; margin-top: 2px; overflow: hidden; color: #a3a3ad; font-size: 13px; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.empty { margin: 12px 8px 0; color: var(--mute); font-size: 14px; }
.editor { display: flex; flex-direction: column; min-height: 62vh; padding: 10px 14px 14px; }
.ed-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); }
.edited { flex: 1 1 auto; color: var(--mute); font-size: 13px; }
.ed-acts { display: flex; gap: 2px; }
.back { display: none; }
.editor textarea {
  flex: 1 1 auto; min-height: 50vh; margin-top: 10px; padding: 8px 6px; border: 0; border-radius: 10px; background: transparent;
  color: #f1f1f4; font-size: 16px; line-height: 1.6; resize: none;
}
.editor textarea:focus { outline: none; box-shadow: none; }
.editor textarea:focus-visible { outline: none; }
.editor:focus-within { border-color: #33333b; }

/* ---- status, undo, footer -------------------------------------------------------------------------------- */
.sync { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 12px 0 0; color: var(--mute); font-size: 13px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3a3a42; 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-busy::before { background: #b9b9c2; }
.sync.is-bad { color: var(--danger); }
.sync.is-bad::before { background: var(--danger); }
.undo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 0; padding: 10px 12px 10px 16px; border: 1px solid var(--line2); border-radius: 14px; color: #fff; font-size: 14px; }
.undo .btn { min-height: 34px; }
.foot { max-width: 1080px; margin: 0 auto; padding: 4px 20px 44px; color: #868692; font-size: 12.5px; }
.foot p { margin: 0 0 6px; max-width: 60em; }
.foot a { color: #c4c4cc; text-decoration: underline; text-decoration-color: rgba(196, 196, 204, .45); }
.foot a:hover { text-decoration-color: currentColor; }
.locker { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.locker .row { margin-top: 8px; }
.locker .btn { min-height: 36px; font-size: 13px; }
.locker select { min-height: 36px; padding: 5px 10px; font-size: 13px; }
.meter { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.meter-bar { display: inline-block; width: 140px; height: 6px; overflow: hidden; border-radius: 999px; background: #1d1d23; }
.meter-fill { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--core); }
.meter-fill.is-full { background: var(--danger); }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { min-height: 0; max-height: none; }
  .is-editing .side { display: none; }
  .editor { display: none; min-height: 70vh; }
  .is-editing .editor { display: flex; }
  .back { display: inline-flex; min-height: 36px; padding: 0 14px; }
}
@media (max-width: 600px) {
  .top { padding: 16px 16px 4px; }
  .mark { font-size: 22px; }
  .top-nav { gap: 14px; }
  main { padding: 0 14px 20px; }
  .card { padding: 18px 16px 20px; border-radius: 18px; }
  .row.tight { flex-wrap: wrap; }
  .row.tight input { flex-basis: 100%; }
  .foot { padding: 4px 16px 36px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
