* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  --bg: #f8faf9;
  --paper: #fff;
  --ink: #19221f;
  --muted: #62716a;
  --line: #e2e9e5;
  --mint: #b4fce1;
  --green: #25614b;
  --soft: #f0f5f2;
  --red: #b62c3e;
  --accent-ink: #163a2c;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101513;
  --paper: #171e1b;
  --ink: #edf4f0;
  --muted: #a0b0a7;
  --line: #2c3932;
  --green: #b4fce1;
  --soft: #202b25;
  --red: #ff9eab;
}
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
h2 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 0.95rem;
  font-weight: 600;
}
p,
small,
.small {
  color: var(--muted);
}
small,
.small {
  font-size: 0.83rem;
}
.skip {
  position: fixed;
  top: -100px;
  padding: 12px;
  background: var(--paper);
  z-index: 30;
}
.skip:focus {
  top: 0;
}
.loading {
  padding: 12vh 8vw;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.14rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  font-weight: 650;
}
.brand img {
  width: 34px;
  height: 34px;
  padding: 5px;
  background: #050505;
  border-radius: 4px;
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 28px 16px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
}
.sidebar .brand {
  padding: 0 12px;
}
.workspace-label {
  margin: 38px 12px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover {
  background: var(--soft);
  color: var(--ink);
}
.nav a.active {
  background: var(--mint);
  color: var(--accent-ink);
  font-weight: 600;
}
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.help-link {
  display: block;
  padding: 12px 12px 22px;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 18px 8px 0;
}
.avatar {
  width: 32px;
  height: 32px;
  background: var(--soft);
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
  flex-shrink: 0;
}
.profile-name {
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile small {
  font-size: 0.74rem;
  display: block;
}
.body {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  gap: 14px;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}
.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px;
  font-size: 0.82rem;
  text-decoration: none;
}
.text-button:hover {
  color: var(--ink);
}
.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 5% 25px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.intro {
  margin-top: 10px;
  font-size: 0.9rem;
  max-width: 580px;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 1px solid var(--mint);
  border-radius: 5px;
  padding: 10px 17px;
  color: var(--accent-ink);
  background: var(--mint);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  min-height: 42px;
}
.button.secondary {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.button.danger {
  background: transparent;
  border-color: var(--red);
  color: var(--red);
}
.button:hover {
  filter: brightness(0.96);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 25px 0;
}
.stat {
  padding: 0 25px;
  border-left: 1px solid var(--line);
}
.stat:first-child {
  border-left: 0;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.stat-value.word {
  font-size: 1.2rem;
  padding-top: 7px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 20px;
}
.subtle-link {
  color: var(--green);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 550;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}
th {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  padding: 12px 15px;
  background: var(--soft);
  white-space: nowrap;
}
td {
  padding: 17px 15px;
  border-top: 1px solid var(--line);
}
td strong {
  font-weight: 550;
}
td code {
  font-size: 0.78rem;
  white-space: nowrap;
}
.table-sub {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 3px;
}
.badge {
  font-size: 0.72rem;
  font-weight: 550;
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}
.badge.good {
  background: var(--mint);
  color: var(--accent-ink);
}
.badge.bad,
.danger-text {
  color: var(--red);
}
.row-action {
  border: 0;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 4px;
  font-size: 0.82rem;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 45px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
}
.footer a {
  text-decoration: none;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
}
.empty h3 {
  margin-bottom: 8px;
}
.empty p {
  max-width: 440px;
  margin: auto;
  font-size: 0.88rem;
}
.empty .button {
  margin-top: 20px;
}
.notice {
  padding: 13px 16px;
  border-left: 3px solid var(--green);
  background: var(--soft);
  margin: 18px 0 24px;
  font-size: 0.85rem;
}
.notice.error {
  border-color: var(--red);
  color: var(--red);
}
.notice p {
  color: inherit;
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 580px) minmax(180px, 1fr);
  gap: 55px;
}
.form-section {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  margin-top: 10px;
}
.form-section h2 {
  margin-bottom: 20px;
}
.form-section > p {
  font-size: 0.88rem;
  margin-bottom: 22px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  margin-bottom: 19px;
}
.field label {
  display: block;
  font-size: 0.83rem;
  font-weight: 550;
  margin-bottom: 8px;
}
input,
select {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 5px;
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  font-size: 0.88rem;
}
input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
select {
  padding-right: 30px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
[hidden] {
  display: none !important;
}
.field-help {
  font-size: 0.76rem;
  margin-top: 6px;
  color: var(--muted);
}
.check-help {
  display: block;
  margin-top: 3px;
}
.aside-note {
  padding-top: 32px;
}
.aside-note > .icon {
  color: var(--green);
  margin-bottom: 14px;
}
.aside-note p {
  font-size: 0.82rem;
  margin-top: 12px;
}
.aside-note > a {
  display: inline-block;
  font-size: 0.82rem;
  margin-top: 18px;
  color: var(--green);
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.83rem;
}
.toolbar input {
  max-width: 370px;
}
.toolbar select {
  max-width: 200px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.detail {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px;
  margin-top: 25px;
  border-radius: 6px;
  max-width: 800px;
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.data-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  margin: 20px 0 30px;
  font-size: 0.88rem;
}
.data-list dt {
  color: var(--muted);
}
.data-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.recovery-code {
  font-family: monospace;
  font-size: 1.05rem;
  display: block;
  overflow-wrap: anywhere;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  margin: 14px 0;
}
.auth-page {
  min-height: 100vh;
}
.auth-main {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 65px 24px;
}
.auth-main > .icon-button {
  position: absolute;
  top: 28px;
  right: 28px;
}
.auth-form {
  width: 100%;
  max-width: 380px;
}
.auth-form > .brand {
  margin-bottom: 36px;
}
.auth-form h1,
.auth-form h2 {
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 650;
  line-height: 1.2;
  margin-bottom: 27px;
}
.auth-form > p {
  font-size: 0.88rem;
  margin: -12px 0 26px;
}
.auth-form .button {
  width: 100%;
}
.auth-bottom {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 22px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-bottom a,
.auth-helper a {
  color: var(--green);
  font-weight: 550;
}
.auth-helper {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
  font-size: 0.8rem;
}
.pending {
  max-width: 650px;
  padding: 20px 0 45px;
}
.pending h1 {
  margin: 24px 0;
}
.pending p {
  font-size: 0.95rem;
}
.steps {
  padding-left: 20px;
  margin: 28px 0;
  font-size: 0.88rem;
}
.steps li {
  padding: 8px 0 8px 6px;
}
.progress {
  height: 5px;
  background: var(--line);
  margin-top: 20px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--mint);
}
.check {
  display: flex;
  gap: 10px;
  align-items: start;
  margin: 20px 0;
  font-size: 0.83rem;
}
.check input {
  flex-shrink: 0;
  width: 17px;
  min-height: 17px;
  margin-top: 3px;
  accent-color: #25614b;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#announcer:not(:empty) {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 15px 20px;
  background: var(--ink);
  color: var(--paper);
  z-index: 20;
  border-radius: 5px;
  box-shadow: 0 4px 24px #0002;
  font-size: 0.88rem;
}
.muted {
  color: var(--muted);
}
.break {
  overflow-wrap: anywhere;
}
.spacer {
  margin-top: 24px;
}
.date-cell {
  white-space: nowrap;
}
.admin-shell .content {
  max-width: 1500px;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    width: 195px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .form-layout {
    gap: 30px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    width: 100%;
    padding: 17px 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    padding: 0;
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    margin-top: 15px;
    padding-bottom: 12px;
  }
  .nav a {
    padding: 9px 10px;
    white-space: nowrap;
    font-size: 0.8rem;
  }
  .nav .icon {
    width: 15px;
  }
  .body {
    display: block;
  }
  .topbar {
    min-height: 62px;
    height: auto;
    padding: 14px 20px;
    flex-wrap: wrap;
  }
  .content {
    padding: 29px 20px 24px;
  }
  .page-head {
    align-items: start;
    gap: 15px;
    flex-wrap: wrap;
  }
  .page-head h1 {
    font-size: 1.7rem;
  }
  .stats {
    margin: 24px 0 29px;
    padding: 20px 0;
  }
  .stat {
    padding: 0 12px;
  }
  .stat-value {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.72rem;
  }
  .stat-value.word {
    font-size: 0.95rem;
  }
  .form-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .aside-note {
    border-top: 1px solid var(--line);
    padding-top: 25px;
  }
  .footer {
    margin-top: 32px;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .data-list {
    grid-template-columns: 110px 1fr;
  }
  .detail {
    padding: 20px;
  }
  .detail-head {
    align-items: start;
  }
  .top-actions {
    gap: 10px;
  }
  .breadcrumb {
    font-size: 0.75rem;
    gap: 7px;
  }
  .pending {
    padding-top: 8px;
  }
}
