:root {
  --ink: #183a32;
  --muted: #52695f;
  --paper: #f3f7f4;
  --surface: #ffffff;
  --line: #d5e2d9;
  --accent: #286247;
  --good: #236549;
  --warn: #78520b;
  --danger: #9f2f37;
  --scroll-thumb: #52695f;
  --scroll-track: #f3f7f4;
  --scroll-hover: #286247;
  --scroll-active: #183a32;
  --radius-panel: 10px;
  --radius-control: 6px;
  --section-gap: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  scrollbar-gutter: stable;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: auto;
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 3px solid var(--scroll-track);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
body {
  margin: 0;
}
h1,
h2,
.brand {
  font-family: Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
}
h1 {
  font-size: 2.1rem;
  margin: 0 0 12px;
}
h2 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}
p {
  margin: 8px 0 16px;
}
small,
.muted {
  color: var(--muted);
}
button,
a,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  padding: 10px 16px;
  background: var(--accent);
  color: var(--surface);
  cursor: pointer;
  min-height: 44px;
  white-space: normal;
}
button:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button.secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
button.secondary:hover:not(:disabled) {
  background: var(--paper);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button[aria-busy="true"] {
  opacity: 0.65;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--surface);
  min-height: 44px;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--accent);
}
textarea {
  resize: none;
  min-height: 132px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.field {
  margin: 16px 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}
.error {
  color: var(--danger);
  min-height: 1.5em;
  margin: 10px 0;
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
}
.help {
  font-size: 0.88rem;
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
}
.brand {
  font-size: 1.8rem;
  margin: 0 0 4px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.73rem;
  color: var(--muted);
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
nav button {
  text-align: left;
}
nav button[aria-current="page"] {
  background: var(--accent);
  color: var(--surface);
}
main {
  padding: 38px clamp(20px, 4vw, 60px);
  max-width: 1350px;
  min-width: 0;
}
main > header {
  margin-bottom: 26px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 24px;
  margin-bottom: var(--section-gap);
  min-width: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--section-gap);
}
.grid > .panel {
  margin: 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.card:first-child {
  border-top: 0;
}
.card h3 {
  margin-bottom: 5px;
}
.spine {
  border-left: 5px solid var(--accent);
  padding-left: 16px;
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 4px 8px 8px 0;
}
.warning {
  border-left: 4px solid var(--warn);
  padding: 12px 16px;
  background: var(--paper);
  font-size: 0.9rem;
}
.hash {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}
.terms {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  padding: 20px 0;
  color: var(--muted);
}
.login {
  max-width: 510px;
  margin: 8vh auto;
  padding: 28px;
}
.login header {
  padding-bottom: 18px;
}
.password-row {
  display: flex;
  gap: 8px;
}
.password-row input {
  min-width: 0;
}
.password-row button {
  min-width: 78px;
}
.account {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  overflow-wrap: anywhere;
}
.banner {
  margin-top: 22px;
  font-size: 0.83rem;
}
.summary {
  font-size: 1.6rem;
  font-family: Georgia, serif;
}
.inline-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.list-count {
  font-size: 0.85rem;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 700px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-control);
  z-index: 20;
  pointer-events: none;
}
#notice:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  max-width: min(92vw, 520px);
  max-height: 90dvh;
  overflow: auto;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: rgb(24 58 50 / 0.35);
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  background: var(--surface);
  padding: 10px;
  z-index: 30;
}
.skip:focus {
  top: 12px;
}
.letterhead {
  border-top: 4px solid var(--accent);
  padding-top: 16px;
}
.logo {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: bold;
}
.tone-navy {
  color: #17365d;
}
.tone-plum {
  color: #65385e;
}
.definition {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 2fr;
  gap: 8px;
  margin: 12px 0;
}
.definition dt {
  color: var(--muted);
}
.definition dd {
  margin: 0;
  overflow-wrap: anywhere;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.85rem;
}
.loading {
  min-height: 100px;
}
.wide {
  grid-column: 1/-1;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 14px;
  }
  .account {
    margin-top: 14px;
    padding-top: 12px;
  }
  .account p {
    margin: 0;
  }
  .account button {
    margin-top: 10px;
  }
  main {
    padding: 24px 16px;
  }
  .panel {
    padding: 18px;
  }
  .login {
    margin: 24px auto;
    padding: 18px;
  }
  .inline-pair {
    grid-template-columns: 1fr;
  }
  .banner {
    margin-top: 12px;
  }
  .definition {
    grid-template-columns: 1fr;
  }
  .definition dd {
    margin-bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none;
  }
  button:active:not(:disabled) {
    transform: none;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  button,
  .panel,
  input,
  select,
  textarea {
    border-color: ButtonText;
  }
}
nav button[aria-current="page"]:hover:not(:disabled) {
  background: var(--ink);
  color: var(--surface);
}

.firm-logo {
  width: 96px;
  height: 64px;
  max-width: 128px;
  max-height: 96px;
  object-fit: contain;
}
