/* The account web's own rules (plan Task 12), on the app's tokens (tokens.css). Hairline rules, 4-6 px radius, no
   shadows, figures in Plex Mono with tabular numbers, 44 px targets, a 16 px gutter on a phone. Fonts are
   self-hosted (fonts/, IBM Plex under the SIL Open Font License, fonts/LICENSE): no request leaves this origin. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.6rem; }
p { max-width: var(--measure); }

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding: 0.5rem 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.brand { font-weight: 600; color: var(--text); text-decoration: none; min-height: 44px; display: inline-flex;
  align-items: center; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.nav a { color: var(--dim); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--text); }

.page { max-width: 1080px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.page.narrow { max-width: 720px; }
.lede { color: var(--dim); }

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1rem 1.1rem;
  margin: 0 0 1.25rem;
}
.panel.notice { border-color: var(--warn-rule); background: var(--warn-wash); }
.panel-danger { border-color: var(--danger); }

.stack { display: flex; flex-direction: column; gap: 0.75rem; max-width: 28rem; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.grow { flex: 1 1 12rem; }
.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.links a { min-height: 44px; display: inline-flex; align-items: center; }

.field { display: flex; flex-direction: column; gap: 0.25rem; }
.field span { color: var(--dim); font-size: 0.9rem; }
input {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  min-height: 44px;
  padding: 0.4rem 0.6rem;
}
input:hover { border-color: var(--rule-hover); }
.check { display: flex; gap: 0.6rem; align-items: center; min-height: 44px; }
.check input { min-height: 0; width: 1.25rem; height: 1.25rem; }

fieldset.confirm {
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  margin: 0;
  padding: 0.6rem 0.8rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 28rem;
}
fieldset.confirm legend { color: var(--dim); font-size: 0.9rem; padding: 0 0.3rem; }

.btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--rule);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { border-color: var(--rule-hover); }
.btn-primary { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--white); }
.btn-danger { background: var(--danger-wash); border-color: var(--danger); color: var(--text); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--dim); font-weight: 400; }
[hidden] { display: none !important; }

details { margin: 0.75rem 0 0; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--accent); }

.messages:empty { display: none; }
.msg {
  border-radius: var(--r);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  max-width: var(--measure);
}
.msg-error { border-color: var(--danger); background: var(--danger-wash); }
.msg-ok { border-color: var(--rule); background: var(--panel-2); }
.msg-warn { border-color: var(--warn-rule); background: var(--warn-wash); }

.micro { font-size: 0.8rem; color: var(--mute); max-width: var(--measure); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.secret { font-size: 1.1rem; letter-spacing: 0.05em; word-break: break-all; }
.wrap { word-break: break-all; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 0 0.4rem;
  color: var(--dim);
}
.tag-warn { border-color: var(--warn-rule); color: var(--warn); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule-soft); }
.list li:last-child { border-bottom: 0; }

.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.table th { color: var(--dim); font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.foot { padding: 1rem 16px 2rem; text-align: center; }
.foot span { display: inline-block; max-width: var(--measure); }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  h1 { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
