/* The portal's Nocturne look (amethyst-house-portal/frontend/src/styles): its tokens, dark and
   light by the OS's preference, and the few kit pieces these pages use. */
:root {
  color-scheme: dark;
  --bg: #09080c; --glass: rgba(255, 255, 255, 0.035); --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.13); --ink: #f0eef5; --ink2: #cdc9d8; --muted: #9a95a8;
  --muted2: #767185; --accent: #b69cff; --fill: #7a5cf0; --good: #8fd6a8; --warn: #e8c07a;
  --danger: #f0a08a; --link: #b69cff; --link-hover: #d3c4ff; --well: rgba(0, 0, 0, 0.3);
  --serif: 'Instrument Serif', Georgia, serif; --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace; --radius-card: 16px; --radius-input: 10px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f6f4fa; --glass: rgba(255, 255, 255, 0.72); --line: rgba(40, 20, 90, 0.09);
    --line2: rgba(40, 20, 90, 0.16); --ink: #17131f; --ink2: #3b3547; --muted: #655e72;
    --muted2: #7f788c; --accent: #6546d6; --fill: #6a4bdc; --good: #2c8455; --warn: #9a6a17;
    --danger: #b94d36; --link: #6546d6; --link-hover: #4a2fb8; --well: rgba(255, 255, 255, 0.95);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--sans);
  background-image: radial-gradient(circle at 15% -10%, rgba(122, 92, 240, 0.18), transparent 45%);
  min-height: 100vh;
}
main { max-width: 1120px; margin: 0 auto; padding: 8px 24px 64px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 20px 24px; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.brand .nx-serif { font-size: 26px; }
nav { display: flex; align-items: center; gap: 18px; }
nav form { margin: 0; }

.nx-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted2); margin: 0 0 8px; }
.nx-serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
.nx-mono { font-family: var(--mono); }
.nx-muted { color: var(--muted); }
h1 { font-weight: 400; margin: 0; }
h1.nx-serif { font-size: 40px; line-height: 1.15; }
h1.address { font-size: 22px; font-weight: 500; word-break: break-all; }
.sub { color: var(--ink2); max-width: 62ch; }

.hero { max-width: 640px; padding: 72px 0 24px; }
.hero h1 { margin-bottom: 12px; }
.head { padding: 24px 0 20px; }

.nx-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; line-height: 1.5;
  padding: 8px 18px; border-radius: 100px; border: 1px solid transparent; background: var(--fill); color: #fff;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.nx-btn:hover { filter: brightness(1.08); }
.nx-btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2); }
.nx-btn:focus-visible, .nx-link:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nx-link { font: inherit; font-size: 13px; color: var(--link); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: none; }
.nx-link:hover { color: var(--link-hover); }
.nx-link.danger { color: var(--danger); }
.nx-error { color: var(--danger); border: 1px solid var(--line2); border-radius: var(--radius-input);
  padding: 10px 14px; background: var(--glass); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px 22px; backdrop-filter: blur(12px); }
.card.new { border-color: var(--accent); margin-bottom: 18px; }
.card.scroll { overflow-x: auto; }
.secret { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.secret code { font: 500 15px var(--mono); background: var(--well); border: 1px solid var(--line2);
  border-radius: var(--radius-input); padding: 8px 12px; word-break: break-all; }

dl.settings { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 18px; }
dl.settings dt { color: var(--muted); }
dl.settings dd { margin: 0; }

.nx-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.nx-table th { font: 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted2);
  text-align: left; font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.nx-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.nx-table tr:last-child td { border-bottom: 0; }
.nx-table tfoot td { border-top: 1px solid var(--line2); font-weight: 500; }
.nx-table .end { text-align: right; }
.nx-table .end form { margin: 0; }
.nx-table .num { text-align: right; font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.log .who { word-break: break-all; min-width: 12ch; }
.log .subject { color: var(--ink2); }
.log .dir { color: var(--muted); }
.log .detail { display: block; font-size: 12.5px; word-break: break-word; }
.status { font-weight: 500; }
.status.good { color: var(--good); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--danger); }

form.inline { display: flex; gap: 10px; flex-wrap: wrap; }
input { font: inherit; color: var(--ink); background: var(--well); border: 1px solid var(--line2);
  border-radius: var(--radius-input); padding: 8px 12px; flex: 1 1 260px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.card + .card { margin-top: 18px; }
.counts th.num { white-space: normal; }

/* Phones: the log as a list of small cards, the passwords without when they were made. */
@media (max-width: 720px) {
  main, .top { padding-left: 16px; padding-right: 16px; }
  .brand .nx-label { display: none; }
  nav { gap: 14px; white-space: nowrap; }
  h1.nx-serif { font-size: 32px; }
  .card { padding: 16px; }
  .nx-table td, .nx-table th { padding: 7px 6px; }
  .tokens .made { display: none; }
  .log thead { display: none; }
  .log, .log tbody { display: block; }
  .log tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px 0;
    border-bottom: 1px solid var(--line); }
  .log tr:last-child { border-bottom: 0; }
  .log td { padding: 0; border: 0; }
  .log .when { grid-column: 2; color: var(--muted); font-size: 12.5px; }
  .log .dir { grid-row: 1 / span 4; }
  .log .who, .log .subject, .log .what { grid-column: 2; }
}
