/* Shared feedback widget. */
.feedback-fab {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--foreground);
  cursor: pointer;
}
.feedback-fab:hover { border-color: var(--muted); }
.feedback-tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 0.8125rem;
  white-space: nowrap;
  visibility: hidden;
}
.feedback-fab:hover .feedback-tooltip,
.feedback-fab:focus-visible .feedback-tooltip { visibility: visible; }
.feedback-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.5rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--foreground);
  font: inherit;
  overscroll-behavior: contain;
}
.feedback-dialog::backdrop { background: rgba(9, 9, 11, 0.8); }
.feedback-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.feedback-header h2 { font-size: 1.125rem; }
.feedback-close {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: transparent;
  cursor: pointer;
}
.feedback-tabs { display: flex; gap: 0.5rem; margin: 1.25rem 0; }
.feedback-tabs button {
  flex: 1;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--background);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
}
.feedback-tabs button[aria-selected="true"] { background: var(--foreground); color: var(--background); }
.feedback-form label { display: block; margin: 1rem 0 0.375rem; font-size: 0.875rem; font-weight: 500; }
.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--background);
  color: var(--foreground);
  font: inherit;
  color-scheme: dark;
}
.feedback-form textarea { resize: vertical; min-height: 7rem; }
.feedback-form input::placeholder,
.feedback-form textarea::placeholder { color: var(--muted); }
.feedback-note { margin-top: 1rem; color: var(--muted); font-size: 0.8125rem; }
.feedback-counter {
  margin-top: 0.375rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.feedback-counter--warn { color: #f87171; }
.feedback-error { margin-top: 1rem; font-size: 0.875rem; }
.feedback-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem;
  border: 1px solid var(--foreground);
  border-radius: var(--radius-control);
  background: var(--foreground);
  color: var(--background);
  font-weight: 600;
  cursor: pointer;
}
.feedback-widget button:disabled { opacity: 0.6; cursor: wait; }
.feedback-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: feedback-spin 0.7s linear infinite;
}
.feedback-toast {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: calc(max(1.25rem, env(safe-area-inset-bottom)) + 4rem);
  z-index: 90;
  max-width: min(24rem, calc(100% - 2.5rem));
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--foreground);
  font-size: 0.875rem;
}
.feedback-toast:not(:empty) { padding: 1rem; border: 1px solid var(--border); }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .feedback-spinner { animation: none; } }

:root {
  --background: #09090b;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-strong: #3f3f46;
  --foreground: #fafafa;
  --foreground-hover: #e4e4e7;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius-card: 0.75rem;
  --radius-control: 0.375rem;
  --shell-max: 72rem;
  --header-h: 4rem;
  --speed: 150ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --strength-weak: #EF4444;
  --strength-medium: #EAB308;
  --strength-strong: #22C55E;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  background-color: var(--background);
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background-color: var(--foreground);
  color: var(--background);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border: 2px solid var(--background);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--border-strong);
}

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .shell {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .shell {
    padding-inline: 2rem;
  }
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  padding: 0.625rem 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand__logo {
  display: none;
  height: 1.5rem;
  width: auto;
}

.brand__icon {
  height: 1.5rem;
  width: auto;
}

@media (min-width: 768px) {
  .brand__logo {
    display: block;
  }

  .brand__icon {
    display: none;
  }
}

.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.875rem;
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background-color: var(--surface);
  color: var(--foreground);
}

.nav-link--cta {
  margin-left: 0.25rem;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--foreground);
}

.nav-link--cta:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-hover);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -0.5rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.nav-toggle:hover {
  background-color: var(--surface);
  color: var(--foreground);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.mobile-nav {
  border-top: 1px solid var(--border);
  background-color: var(--background);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  padding-block: 0.5rem;
  list-style: none;
}

.mobile-nav__link {
  display: block;
  padding: 0.75rem 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: color var(--speed) var(--ease);
}

.mobile-nav__link:hover {
  color: var(--foreground);
}

.mobile-nav__link--mail {
  color: var(--foreground);
}

.mobile-nav__list li + li {
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding-inline: 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.btn--primary {
  background-color: var(--foreground);
  color: var(--background);
}

.btn--primary:hover {
  background-color: var(--foreground-hover);
}

.btn--ghost {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--foreground);
}

.btn--ghost:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn--sm {
  height: 2.25rem;
  padding-inline: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 400;
}

.hero {
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  padding-block: 3rem;
}

@media (min-width: 640px) {
  .hero__inner {
    padding-block: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding-block: 5rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.75rem;
}

.badge .icon {
  color: var(--subtle);
}

.hero__title {
  margin-top: 1.5rem;
  max-width: 48rem;
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 3rem;
  }
}

.hero__lede {
  margin-top: 1.25rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

@media (min-width: 640px) {
  .hero__lede {
    font-size: 1.125rem;
  }
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__actions .btn {
  width: 100%;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
  }

  .hero__actions .btn {
    width: auto;
  }
}

.main-section {
  padding-block: 3rem;
}

@media (min-width: 640px) {
  .main-section {
    padding-block: 4rem;
  }
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-head__title {
  font-size: 1.25rem;
}

@media (min-width: 640px) {
  .section-head__title {
    font-size: 1.5rem;
  }
}

.section-head__text {
  margin-top: 0.5rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.result-count {
  flex-shrink: 0;
  color: var(--subtle);
  font-size: 0.875rem;
}

.search__field {
  position: relative;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  width: 1rem;
  height: 1rem;
  color: var(--subtle);
  pointer-events: none;
  transform: translateY(-50%);
}

.search__input {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.5rem 0 2.625rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 0.875rem;
  appearance: none;
  transition: border-color var(--speed) var(--ease);
}

.search__input::placeholder {
  color: var(--subtle);
}

.search__input:hover {
  border-color: var(--border-strong);
}

.search__input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.search__input::-webkit-search-cancel-button {
  display: none;
}

.search__clear {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--subtle);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.search__clear:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.chip {
  height: 2rem;
  padding-inline: 0.75rem;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--foreground);
}

.chip[aria-pressed="true"] {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color var(--speed) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
}

.card--linked {
  cursor: pointer;
}

.card--linked:hover {
  background-color: var(--surface-hover);
}

.card__link {
  transition: color var(--speed) var(--ease);
}

.card--linked:hover .card__link,
.card__link:hover {
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.card__action {
  align-self: flex-start;
  margin-top: 1.25rem;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
}

.card__icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.card__category {
  padding-top: 0.25rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.card__title {
  margin-top: 1rem;
  font-size: 1rem;
}

.card__text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  list-style: none;
}

.card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

.card__list .icon {
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.1875rem;
  color: var(--subtle);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 1.5rem;
  background-color: rgba(24, 24, 27, 0.5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  text-align: center;
}

.empty__icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--subtle);
}

.empty__title {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.empty__text {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.contact {
  background-color: rgba(24, 24, 27, 0.4);
  border-top: 1px solid var(--border);
}

.contact__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-block: 3.5rem;
}

@media (min-width: 640px) {
  .contact__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.contact__title {
  font-size: 1.125rem;
}

.contact__text {
  margin-top: 0.5rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.tool-page {
  padding-block: 2.5rem 3.5rem;
}

@media (min-width: 640px) {
  .tool-page {
    padding-block: 3.5rem 4.5rem;
  }
}

.tool-head {
  max-width: 44rem;
}

.tool-head__title {
  font-size: 1.75rem;
}

@media (min-width: 640px) {
  .tool-head__title {
    font-size: 2.25rem;
  }
}

.tool-head__text {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.tool-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}

.calc-inputs,
.calc-aside {
  min-width: 0;
}

.calc-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .calc-inputs {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.how-panel {
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .how-panel {
    margin-top: 1.5rem;
  }
}

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 2rem;
  align-items: start;
  margin-top: 1.25rem;
}

.how-grid > * {
  min-width: 0;
}

@media (min-width: 900px) {
  .how-grid {
    grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  }
}

.how-grid .notes {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.panel {
  padding: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

@media (min-width: 640px) {
  .panel {
    padding: 1.5rem;
  }
}

.panel__title {
  font-size: 1rem;
}

.panel__text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

.field {
  display: block;
}

.field + .field {
  margin-top: 1.25rem;
}

.field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
}

.field__label .req {
  margin-left: 0.25rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 400;
}

.field__control {
  position: relative;
  margin-top: 0.5rem;
}

.field__input {
  width: 100%;
  height: 2.75rem;
  padding: 0 4.25rem 0 0.875rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  transition: border-color var(--speed) var(--ease);
}

.field__input::-webkit-outer-spin-button,
.field__input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.field__input::placeholder {
  color: var(--subtle);
}

.field__input:hover {
  border-color: var(--border-strong);
}

.field__input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.field__input[aria-invalid="true"] {
  border-color: var(--foreground);
}

.field__suffix {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  pointer-events: none;
  transform: translateY(-50%);
}

.field__hint {
  margin-top: 0.5rem;
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.5;
}

.field__error {
  margin-top: 0.5rem;
  color: var(--foreground);
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.form-actions .btn {
  width: 100%;
}

@media (min-width: 480px) {
  .form-actions {
    flex-direction: row;
  }

  .form-actions .btn {
    width: auto;
    flex: 1 1 0;
  }
}

.form-error {
  margin-top: 0.875rem;
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-card {
  padding: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

@media (min-width: 480px) {
  .auth-card {
    padding: 1.75rem;
  }
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand__logo {
  height: 2rem;
  width: auto;
}

.auth-brand__mark {
  height: 2.25rem;
  width: auto;
}

.auth-head {
  margin-top: 1.5rem;
}

.auth-head__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-head__sub {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-head + .auth-tabs {
  margin-top: 1.5rem;
}

.auth-tabs {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
}

.auth-tabs__ind {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  z-index: -1;
  width: calc(50% - 3px);
  background-color: var(--foreground);
  border-radius: 0.4375rem;
  transform: translateX(0);
  transition: transform 280ms var(--ease);
}

.auth-tabs__ind[data-active="signup"] {
  transform: translateX(100%);
}

.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.125rem;
  border: 0;
  border-radius: 0.4375rem;
  background-color: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms var(--ease);
}

.auth-tab:hover {
  color: var(--foreground);
}

.auth-tab[aria-selected="true"] {
  color: var(--background);
}

.auth-tab[aria-selected="true"]:hover {
  color: var(--background);
}

.auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  height: 2.75rem;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease),
    opacity var(--speed) var(--ease);
}

.auth-google:hover:not(:disabled) {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.auth-google:active:not(:disabled) {
  background-color: var(--border);
}

.auth-google:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-google__mark {
  flex-shrink: 0;
}

.auth-card .btn {
  border-radius: 0.625rem;
  font-weight: 600;
}

.auth-card .btn--primary:active:not(:disabled) {
  background-color: var(--foreground-hover);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1.5rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background-color: var(--border);
}

.auth-fields > * + * {
  margin-top: 1rem;
}

.auth-fields > .field + .field,
.auth-fields > .field + .auth-collapse[data-collapsed="false"] {
  margin-top: 1.25rem;
}

.auth-collapse {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: max-height 220ms var(--ease), opacity 150ms var(--ease), margin-top 220ms var(--ease);
}

.auth-collapse[data-collapsed="false"] {
  max-height: var(--collapse-max, 16rem);
  visibility: visible;
  opacity: 1;
}

.auth-collapse--sm {
  --collapse-max: 7rem;
}

.auth-collapse--md {
  --collapse-max: 5rem;
}

.auth-collapse--lg {
  --collapse-max: 12rem;
}

.auth-collapse--xl {
  --collapse-max: 14rem;
}

.auth-fields > .auth-collapse {
  margin-top: 0;
}

.auth-fields > .auth-collapse[data-collapsed="false"] {
  margin-top: 1.25rem;
}

.auth-phone {
  position: relative;
}

.auth-phone__prefix {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding-right: 0.625rem;
  border-right: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
  transform: translateY(-50%);
}

.auth-phone__input {
  padding-left: 4.25rem;
}

.auth-card .field__input {
  border-radius: 0.625rem;
}

.auth-card .field__input:focus {
  border-color: var(--muted);
  box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.08);
}

.auth-card .field__input[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: none;
}

.auth-ico .field__input {
  padding-left: 2.625rem;
}

.auth-ico--reveal .field__input {
  padding-right: 3.25rem;
}

.auth-ico__icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  color: var(--subtle);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color var(--speed) var(--ease);
}

.auth-ico:focus-within .auth-ico__icon {
  color: var(--muted);
}

.auth-caps {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.auth-match {
  margin-top: 0.625rem;
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
  cursor: pointer;
}

.auth-terms input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: var(--foreground);
  cursor: pointer;
}

.auth-terms a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-terms input[aria-invalid="true"] {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 2px;
}

.auth-reveal {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--subtle);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.auth-reveal:hover {
  background-color: var(--border);
  color: var(--foreground);
}

.auth-ok {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  display: inline-flex;
  color: var(--strength-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.75);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.auth-field[data-valid="true"] .field__input {
  border-color: rgba(34, 197, 94, 0.55);
}

.auth-field[data-invalid="true"] .field__input {
  border-color: rgba(239, 68, 68, 0.5);
}

.auth-field[data-valid="true"] .auth-ok {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.auth-strength__label {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-strength__value {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-strength[data-level="3"] .auth-strength__value,
.auth-strength[data-level="4"] .auth-strength__value {
  color: var(--foreground);
}

.auth-strength__track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.auth-strength__seg {
  height: 0.25rem;
  background-color: var(--border);
  border-radius: 999px;
  transition: background-color 200ms var(--ease);
}

.auth-strength[data-level="1"] .auth-strength__seg:nth-child(-n + 1) {
  background-color: var(--subtle);
}

.auth-strength[data-level="2"] .auth-strength__seg:nth-child(-n + 2) {
  background-color: var(--muted);
}

.auth-strength[data-level="3"] .auth-strength__seg:nth-child(-n + 3) {
  background-color: var(--foreground-hover);
}

.auth-strength[data-level="4"] .auth-strength__seg {
  background-color: var(--foreground);
}

.auth-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  margin-top: 0.875rem;
  list-style: none;
}

@media (min-width: 480px) {
  .auth-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.auth-rule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.4;
  transition: color 200ms var(--ease);
}

.auth-rule[data-met="true"] {
  color: var(--muted);
}

.auth-rule__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-color: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--background);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}

.auth-rule__icon .icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0.1875rem;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.auth-rule__icon [data-icon="circle"] {
  opacity: 0;
  transform: scale(0.7);
}

.auth-rule__icon [data-icon="check"] {
  opacity: 0;
  transform: scale(0.7);
}

.auth-rule[data-met="true"] .auth-rule__icon {
  background-color: var(--foreground);
  border-color: var(--foreground);
}

.auth-rule[data-met="true"] .auth-rule__icon [data-icon="check"] {
  opacity: 1;
  transform: scale(1);
}

.auth-spinner {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  border: 2px solid rgba(9, 9, 11, 0.25);
  border-top-color: var(--background);
  border-radius: 999px;
  animation: auth-spin 700ms linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: var(--foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-alert[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.45);
}

.auth-alert[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.45);
}

.auth-alert__icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1875rem;
  flex-shrink: 0;
  color: var(--muted);
}

.auth-alert[data-tone="error"] .auth-alert__icon {
  color: var(--strength-weak);
}

.auth-alert[data-tone="success"] .auth-alert__icon {
  color: var(--strength-strong);
}

.auth-alert__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
}

.auth-note a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color var(--speed) var(--ease), text-decoration-color var(--speed) var(--ease);
}

.auth-note a:hover {
  color: var(--foreground);
  text-decoration-color: var(--foreground);
}

.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  color: var(--subtle);
}

.auth-trust svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.auth-otp {
  margin-top: 1.25rem;
  padding: 1rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
}

.auth-otp__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.auth-otp__badge svg {
  width: 1rem;
  height: 1rem;
}

.auth-otp__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.auth-otp__text {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-otp__target {
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.auth-otp__field {
  margin-top: 0.75rem;
}

.auth-otp__hint {
  margin-top: 0.5rem;
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.5;
}

.auth-otp__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.otp-box {
  width: 100%;
  height: 3rem;
  padding: 0;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.125rem;
  line-height: 1;
  text-align: center;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.otp-box:hover {
  border-color: var(--border-strong);
}

.otp-box:focus {
  outline: none;
  border-color: var(--muted);
  box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.08);
}

.otp-box[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: none;
}

.auth-linkbtn {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color var(--speed) var(--ease), text-decoration-color var(--speed) var(--ease),
    opacity var(--speed) var(--ease);
}

.auth-linkbtn:hover:not(:disabled) {
  color: var(--foreground);
  text-decoration-color: var(--foreground);
}

.auth-linkbtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 1.125rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.summary__label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary__value {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.summary__value--placeholder {
  color: var(--subtle);
  font-size: 1.25rem;
  font-weight: 400;
}

.summary__note {
  color: var(--subtle);
  font-size: 0.75rem;
}

.rows {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
}

.rows + .rows {
  border-top: 1px solid var(--border);
}

.rows__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6875rem;
}

.rows__row + .rows__row {
  border-top: 1px solid var(--border);
}

.rows__label {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rows__hint {
  display: block;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.rows__value {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.rows__value--muted {
  color: var(--muted);
}

.rows__row--total {
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-strong);
}

.rows__row--total .rows__label {
  color: var(--foreground);
  font-weight: 500;
}

.rows__row--total .rows__value {
  font-size: 0.9375rem;
  font-weight: 600;
}

.breakdown-wrap {
  max-width: 100%;
  margin-top: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.how-grid .breakdown-wrap {
  margin-top: 0;
}

.breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.breakdown th,
.breakdown td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.breakdown th {
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.breakdown td:last-child,
.breakdown th:last-child {
  text-align: right;
  white-space: nowrap;
}

.breakdown th:nth-child(2) {
  white-space: nowrap;
}

.breakdown .num {
  font-variant-numeric: tabular-nums;
}

.breakdown .sub {
  display: block;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.breakdown tbody tr:hover {
  background-color: var(--surface-hover);
}

.breakdown tfoot th,
.breakdown tfoot td {
  border-bottom: 0;
  border-top: 1px solid var(--border-strong);
  color: var(--foreground);
  font-weight: 600;
}

.breakdown tfoot .sub {
  color: var(--muted);
  font-weight: 400;
}

@media (max-width: 479px) {
  .breakdown {
    display: block;
  }

  .breakdown thead {
    display: none;
  }

  .breakdown tbody,
  .breakdown tfoot,
  .breakdown tr {
    display: block;
  }

  .breakdown tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.125rem 0.75rem;
    padding-block: 0.625rem;
  }

  .breakdown tbody tr {
    border-bottom: 1px solid var(--border);
  }

  .breakdown tbody tr:last-child {
    border-bottom: 0;
  }

  .breakdown tfoot tr {
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-strong);
  }

  .breakdown th,
  .breakdown td,
  .breakdown tfoot th,
  .breakdown tfoot td {
    border: 0;
    padding: 0;
    white-space: normal;
  }

  .breakdown th {
    grid-column: 1 / -1;
    letter-spacing: 0.04em;
  }

  .breakdown td {
    grid-column: 1;
    text-align: left;
  }

  .breakdown td:last-child {
    grid-column: 2;
    text-align: right;
    white-space: nowrap;
  }
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  list-style: none;
}

.notes li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.notes .icon {
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.1875rem;
  color: var(--subtle);
}

.bracket-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.bracket-table th,
.bracket-table td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.bracket-table th {
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bracket-table td:last-child,
.bracket-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.bracket-table .num {
  font-variant-numeric: tabular-nums;
}

.bracket-table tr[data-active="true"] {
  background-color: var(--surface-hover);
}

.bracket-table tr[data-active="true"] td {
  color: var(--foreground);
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer__top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-block: 3rem;
}

@media (min-width: 640px) {
  .footer__top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer__brand {
  max-width: 24rem;
}

.footer__logo {
  height: 1.5rem;
  width: auto;
}

.footer__blurb {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.footer__cols {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 640px) {
  .footer__cols {
    flex-direction: row;
    gap: 4rem;
  }
}

.footer__label {
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  list-style: none;
}

.footer__link {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color var(--speed) var(--ease);
}

.footer__link:hover {
  color: var(--foreground);
}

.footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: color var(--speed) var(--ease);
}

.footer__mail:hover {
  color: var(--foreground);
}

.footer__mail span {
  word-break: break-all;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer__meta {
  color: var(--subtle);
  font-size: 0.75rem;
}

.legal {
  padding-block: 3rem;
}

@media (min-width: 640px) {
  .legal {
    padding-block: 4rem;
  }
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-bottom: 2rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

.breadcrumb a {
  transition: color var(--speed) var(--ease);
}

.breadcrumb a:hover {
  color: var(--foreground);
}

.legal__header {
  max-width: 42rem;
}

.legal__title {
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .legal__title {
    font-size: 2.25rem;
  }
}

.legal__updated {
  margin-top: 0.75rem;
  color: var(--subtle);
  font-size: 0.8125rem;
}

.legal__intro {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legal__body {
  max-width: 42rem;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal__body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 6rem;
  color: var(--foreground);
  font-size: 1.0625rem;
}

.legal__body h2:first-child {
  margin-top: 0;
}

.legal__body p {
  margin-top: 0.875rem;
}

.legal__body ul,
.legal__body ol {
  margin-top: 0.875rem;
  padding-left: 1.25rem;
}

.legal__body ul {
  list-style: disc;
}

.legal__body ol {
  list-style: decimal;
}

.legal__body li {
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

.legal__body li::marker {
  color: var(--subtle);
}

.legal__body a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--speed) var(--ease);
}

.legal__body a:hover {
  text-decoration-color: var(--foreground);
}

.legal__body strong {
  color: var(--foreground);
  font-weight: 600;
}

.invoice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .invoice-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

.invoice-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.invoice-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-grid .field + .field {
  margin-top: 0;
}

.field__input--no-suffix {
  padding-right: 0.875rem;
}

.field__input--textarea {
  height: auto;
  min-height: 3.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  resize: vertical;
}

select.field__input {
  cursor: pointer;
}

.items-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.items-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.items-table th {
  padding: 0.625rem 0.5rem;
  background-color: var(--background);
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.items-table th:last-child,
.items-table td:last-child {
  text-align: right;
}

.items-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.items-table tr:last-child td {
  border-bottom: 0;
}

.items-table input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 0.8125rem;
}

.items-table input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.items-table__total {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
  text-align: right;
}

.items-table__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--subtle);
  cursor: pointer;
}

.items-table__remove:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
  border-color: var(--border);
}

.invoice-preview-col {
  min-width: 0;
}

@media (min-width: 1024px) {
  .invoice-preview-col {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }
}

.invoice-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.invoice-actions .btn {
  flex: 1 1 0;
}

.invoice-paper {
  background-color: #ffffff;
  color: #18181b;
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
  padding: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow: hidden;
}

@media (min-width: 640px) {
  .invoice-paper {
    padding: 2rem;
  }
}

.invoice-paper__header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #18181b;
}

@media (min-width: 640px) {
  .invoice-paper__header {
    flex-direction: row;
    justify-content: space-between;
  }
}

.invoice-paper__brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: #09090b;
  letter-spacing: -0.02em;
}

.invoice-paper__muted {
  color: #71717a;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.invoice-paper__meta {
  text-align: left;
}

@media (min-width: 640px) {
  .invoice-paper__meta {
    text-align: right;
  }
}

.invoice-paper__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #71717a;
}

.invoice-paper__number {
  font-weight: 700;
  color: #09090b;
  margin-top: 0.125rem;
}

.invoice-paper__bill {
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e4e4e7;
}

.invoice-paper__section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717a;
}

.invoice-paper__strong {
  font-weight: 600;
  color: #09090b;
  margin-top: 0.25rem;
}

.invoice-paper__table {
  width: 100%;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.invoice-paper__table th {
  padding: 0.625rem 0.5rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71717a;
  border-bottom: 1px solid #e4e4e7;
  white-space: nowrap;
}

.invoice-paper__table th:last-child,
.invoice-paper__table td:last-child {
  text-align: right;
}

.invoice-paper__table td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid #f4f4f5;
  vertical-align: top;
}

.invoice-paper__totals {
  margin-top: 1rem;
  margin-left: auto;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.invoice-paper__totals-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f4f4f5;
  font-size: 0.8125rem;
}

.invoice-paper__totals-row--total {
  border-top: 2px solid #18181b;
  border-bottom: 0;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #09090b;
}

.invoice-paper__notes {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e4e4e7;
}

.invoice-paper__qr {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e4e4e7;
}

.invoice-paper__qr-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.invoice-paper__qr-block {
  text-align: center;
}

.invoice-paper__qr-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #09090b;
  margin-bottom: 0.5rem;
}

.invoice-paper__qr-code {
  display: inline-flex;
  padding: 0.5rem;
  border: 1px solid #e4e4e7;
  border-radius: 0.375rem;
  background: #fff;
}

.invoice-paper__qr-code img,
.invoice-paper__qr-code canvas {
  display: block;
  width: 110px !important;
  height: 110px !important;
}

.invoice-paper__qr-value {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  max-width: 130px;
  overflow-wrap: anywhere;
}

.invoice-paper__footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e4e4e7;
  color: #a1a1aa;
  font-size: 0.6875rem;
  text-align: center;
}

.pdf-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 2rem;
  padding: 0.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

@media (min-width: 900px) {
  .pdf-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pdf-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.625rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.pdf-tab:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.pdf-tab[aria-selected="true"] {
  background-color: var(--background);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.pdf-tab .icon {
  width: 1rem;
  height: 1rem;
  color: var(--subtle);
}

.pdf-tab[aria-selected="true"] .icon {
  color: var(--foreground);
}

.pdf-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.pdf-privacy .icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.1875rem;
  color: var(--strength-strong);
}

.pdf-privacy strong {
  color: var(--foreground);
  font-weight: 500;
}

.pdf-statusbar {
  margin-top: 1.25rem;
  padding: 0.875rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.pdf-statusbar__text {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.pdf-statusbar__text .icon {
  width: 0.9375rem;
  height: 0.9375rem;
  flex-shrink: 0;
  margin-top: 0.1875rem;
  color: var(--muted);
}

.pdf-statusbar[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.5);
}

.pdf-statusbar[data-tone="error"] .pdf-statusbar__text .icon {
  color: var(--strength-weak);
}

.pdf-statusbar[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.45);
}

.pdf-statusbar[data-tone="success"] .pdf-statusbar__text .icon {
  color: var(--strength-strong);
}

.pdf-progress-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 0.75rem;
}

.pdf-spinner {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-top-color: var(--foreground);
  border-radius: 999px;
  animation: pdf-spin 700ms linear infinite;
}

@keyframes pdf-spin {
  to {
    transform: rotate(360deg);
  }
}

.pdf-progress {
  display: block;
  flex: 1 1 auto;
  height: 0.25rem;
  overflow: hidden;
  background-color: var(--border);
  border-radius: 999px;
}

.pdf-progress__bar {
  width: 0%;
  height: 100%;
  background-color: var(--foreground);
  border-radius: 999px;
  transition: width 180ms var(--ease);
}

.pdf-progress__label {
  margin-top: 0.5rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.pdf-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 1024px) {
  .pdf-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 1.5rem;
  }
}

.pdf-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.pdf-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 480px) {
  .field-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem;
  background-color: var(--background);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  text-align: center;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.dropzone:hover {
  border-color: var(--muted);
}

.dropzone[data-drag="true"] {
  background-color: var(--surface-hover);
  border-style: solid;
  border-color: var(--foreground);
}

.dropzone--sm {
  padding: 1.25rem 1rem;
}

.dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  max-width: 26rem;
}

.dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.dropzone__icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.dropzone__title {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.dropzone--sm .dropzone__title {
  font-size: 0.8125rem;
}

.dropzone__text {
  color: var(--muted);
  font-size: 0.8125rem;
}

.dropzone--sm .dropzone__text {
  font-size: 0.75rem;
}

.dropzone__browse {
  padding: 0;
  background: none;
  border: 0;
  color: var(--foreground);
  font-size: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color var(--speed) var(--ease);
}

.dropzone__browse:hover {
  text-decoration-color: var(--foreground);
}

.dropzone__hint {
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.filelist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  list-style: none;
}

.filelist-empty {
  margin-top: 1rem;
  padding: 0.875rem;
  background-color: var(--background);
  border: 1px dashed var(--border);
  border-radius: var(--radius-control);
  color: var(--subtle);
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: center;
}

.filelist__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.filelist__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.filelist__meta {
  flex: 1 1 auto;
  min-width: 0;
}

.filelist__name {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.filelist__sub {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.filelist__actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  flex-shrink: 0;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--subtle);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.iconbtn:hover:not(:disabled) {
  background-color: var(--surface-hover);
  border-color: var(--border);
  color: var(--foreground);
}

.iconbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}

.thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.thumb__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 6.25rem;
  padding: 0.5rem;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.thumb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.25rem;
}

.thumb__order {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding-inline: 0.25rem;
  background-color: var(--foreground);
  border-radius: 0.25rem;
  color: var(--background);
  font-size: 0.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.thumb__body {
  padding: 0.5rem 0.5rem 0.25rem;
}

.thumb__name {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.thumb__sub {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
}

.thumb__actions {
  display: flex;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem 0.5rem;
}

.thumb__actions .iconbtn {
  flex: 1 1 0;
  width: auto;
}

.page-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  max-height: 14rem;
  margin-top: 1rem;
  padding: 0.75rem;
  overflow-y: auto;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.page-chip {
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: 0.5rem;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.page-chip:hover {
  border-color: var(--border-strong);
  color: var(--foreground);
}

.page-chip[aria-pressed="true"] {
  background-color: var(--foreground);
  border-color: var(--foreground);
  color: var(--background);
}

.segmented {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.segmented__btn {
  height: 2.25rem;
  padding-inline: 0.875rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.segmented__btn:hover {
  color: var(--foreground);
}

.segmented__btn[aria-pressed="true"] {
  background-color: var(--surface-hover);
  border-color: var(--border);
  color: var(--foreground);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.5rem;
}

.range {
  flex: 1 1 auto;
  height: 0.25rem;
  background-color: var(--border);
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  background-color: var(--foreground);
  border: 2px solid var(--background);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--border-strong);
  appearance: none;
  cursor: pointer;
}

.range::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--foreground);
  border: 2px solid var(--background);
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--border-strong);
  cursor: pointer;
}

.range__value {
  min-width: 3.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-row input[type="color"] {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  cursor: pointer;
}

.color-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-row input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 0.25rem;
}

body.is-locked {
  overflow: hidden;
}

.account {
  position: relative;
}

.account__trigger {
  display: inline-flex;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.account__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 60;
  min-width: 14rem;
  padding: 0.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  background-color: var(--surface-hover);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar__img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.account__row {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--border);
}

.account__name {
  font-size: 0.8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.account__mail {
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  overflow-wrap: anywhere;
}

.account__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.account__btn:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

button.mobile-nav__link {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.reviews-status {
  padding: 0.75rem 0.875rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.reviews-status[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--foreground);
}

.reviews-status[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--foreground);
}

/* Reviews: search and category chips sit with the grid they filter, not in the
   hero above it, so the controls are never separated from their results. */
.review-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.review-toolbar .chip-row {
  margin-top: 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 1.5rem;
  padding-inline: 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1;
}

.tag--domain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
}

.review-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.875rem;
}

/* Rating stars are the foreground colour, not a rating hue. A filled star is
   solid white and an empty one is a white outline, so the rating still reads at a
   glance and the page keeps to dark, white and grey. */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  color: var(--foreground);
}

.star__icon {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.star[data-on="true"] .star__icon,
.star-picker__btn[data-on="true"] .star__icon {
  fill: currentColor;
}

.review-card__rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.625rem;
  margin-top: 1rem;
}

.review-card__score {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.review-card__count {
  color: var(--subtle);
  font-size: 0.75rem;
}

.review-card__text {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.review-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.review-card__actions .btn {
  flex: 1 1 0;
  min-width: 0;
}

.review-sort {
  appearance: none;
  height: 2.25rem;
  padding: 0 2rem 0 0.625rem;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23A1A1AA' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease);
}

.review-sort:hover,
.review-sort:focus-visible {
  border-color: var(--border-strong);
  outline: none;
}

.review-sort--sm {
  height: 1.875rem;
  padding-right: 1.75rem;
  font-size: 0.75rem;
}

.review-card__empty-rating {
  color: var(--subtle);
  font-size: 0.8125rem;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.5rem;
  padding-inline: 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.rating-badge .star__icon {
  width: 0.8125rem;
  height: 0.8125rem;
  fill: currentColor;
}

.rating-badge--empty {
  color: var(--subtle);
  font-weight: 400;
}

.section-head__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.modal-toolbar__label {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background-color: rgba(9, 9, 11, 0.78);
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 2rem 1rem;
  }
}

.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 30rem;
  padding: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  text-align: left;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal__title {
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.modal__sub {
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.modal__body {
  margin-top: 1.25rem;
  overflow-y: auto;
}

.modal__foot {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.modal__foot .btn {
  flex: 1 1 0;
}

.auth-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background-color: var(--background);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-control);
  text-align: center;
}

.auth-gate__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
}

.auth-gate__text {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-gate__hint {
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.55;
}

.star-picker {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.star-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--border-strong);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease),
    color var(--speed) var(--ease);
}

.star-picker__btn:hover {
  background-color: var(--surface-hover);
  color: var(--muted);
}

.star-picker__btn[data-on="true"] {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.star-picker__btn .star__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.counter {
  margin-top: 0.375rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.counter[data-state="max"] {
  color: var(--foreground);
}

.review-list {
  display: flex;
  flex-direction: column;
}

.review-item {
  padding-block: 0.875rem;
}

.review-item:first-child {
  padding-top: 0;
}

.review-item + .review-item {
  border-top: 1px solid var(--border);
}

.review-item__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.review-item__who {
  min-width: 0;
}

.review-item__name {
  font-size: 0.8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.review-item__date {
  display: block;
  margin-top: 0.0625rem;
  color: var(--subtle);
  font-size: 0.6875rem;
}

.review-item__stars {
  margin-left: auto;
  flex-shrink: 0;
}

.review-item__text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.empty--sm {
  padding: 2rem 1rem;
  gap: 0.75rem;
}

@media print {
  .site-header,
  .breadcrumb,
  .tool-head,
  .invoice-form,
  .invoice-actions,
  .site-footer {
    display: none !important;
  }
  .invoice-paper {
    border: 0;
    border-radius: 0;
    padding: 0;
  }
  body {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.tool-back {
  margin-bottom: 1.5rem;
}

.model-search {
  margin-top: 1.25rem;
}

.model-count {
  margin-top: 0.875rem;
  color: var(--subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.token-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.token-stats__item {
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.token-stats__value {
  display: block;
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.token-stats__label {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.range-input {
  flex: 0 0 6.5rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  appearance: textfield;
  transition: border-color var(--speed) var(--ease);
}

.range-input::-webkit-outer-spin-button,
.range-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.range-input::placeholder {
  color: var(--subtle);
}

.range-input:hover {
  border-color: var(--border-strong);
}

.range-input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.model-fieldset {
  margin-top: 1.5rem;
  padding: 0;
  border: 0;
}

.model-fieldset legend {
  padding: 0;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

.model-checks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (min-width: 640px) {
  .model-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.model-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.model-check:hover {
  border-color: var(--border-strong);
}

.model-check:has(input:checked),
.model-check--on {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.model-check input {
  flex-shrink: 0;
  width: 0.875rem;
  height: 0.875rem;
  margin-top: 0.1875rem;
  accent-color: var(--foreground);
  cursor: pointer;
}

.model-check__text {
  min-width: 0;
}

.model-check__name {
  display: block;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

.model-check__price {
  display: block;
  margin-top: 0.0625rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.cost-block {
  margin-top: 0.875rem;
  padding: 0.875rem 1rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.cost-block[data-best="true"] {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.cost-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cost-block__name {
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
}

.best-tag {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--foreground);
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
}

.cost-block .rows {
  margin-top: 0.25rem;
}

.model-sizes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.875rem;
}

.model-sizes__label {
  color: var(--subtle);
  font-size: 0.75rem;
}

.model-table {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.model-table th,
.model-table td {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.model-table tbody tr {
  transition: background-color var(--speed) var(--ease);
}

.model-table tbody tr:hover {
  background-color: var(--surface-hover);
}

.model-table tbody tr[data-on="true"] {
  background-color: var(--surface-hover);
}

.model-table tbody tr[data-best="true"] th:first-child {
  box-shadow: inset 2px 0 0 var(--foreground);
}

.model-table tbody th {
  min-width: 12rem;
}

.model-table thead th {
  padding-block: 0.5rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.model-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  background-color: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color var(--speed) var(--ease);
}

.model-sort:hover {
  color: var(--foreground);
}

.model-sort .icon {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.model-table th[aria-sort="ascending"] .model-sort,
.model-table th[aria-sort="descending"] .model-sort {
  color: var(--foreground);
}

.model-table th[aria-sort="ascending"] .model-sort .icon,
.model-table th[aria-sort="descending"] .model-sort .icon {
  opacity: 1;
}

.model-table th[aria-sort="descending"] .model-sort .icon {
  transform: rotate(180deg);
}

.model-cell__provider {
  display: block;
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.model-cell__name {
  display: block;
  margin-top: 0.125rem;
  color: var(--foreground);
  font-weight: 500;
}

.model-cell__id {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
}

.model-cell__note {
  display: block;
  margin-top: 0.1875rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.model-meta {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.model-meta--latency {
  margin-top: 0.1875rem;
  color: var(--foreground);
  font-size: 0.6875rem;
}

.model-add {
  height: 1.75rem;
  padding-inline: 0.625rem;
  font-size: 0.6875rem;
}

.page-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 2rem;
}

.page-bar .breadcrumb {
  margin-bottom: 0;
}

.tool-head + .panel {
  margin-top: 2rem;
}

.bench-meta {
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.geez-font {
  font-family: "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", "Kefa", var(--font-sans);
}

.panel__title--sm {
  font-size: 0.9375rem;
}

.today-panel {
  margin-top: 2rem;
}

.today-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1rem;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  overflow: hidden;
}

@media (min-width: 900px) {
  .today-card {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.today-card__block {
  padding: 1rem;
  background-color: var(--surface);
}

.today-card__label {
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.today-card__value {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.today-card__sub {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cal__title {
  display: block;
  margin-top: 0.125rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cal__nav {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.cal__sub {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.cal__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 1rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.cal__cell {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-height: 4.25rem;
  padding: 0.375rem 0.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.cal__cell:hover {
  border-color: var(--border-strong);
  background-color: var(--surface-hover);
}

.cal__cell--empty {
  background-color: transparent;
  border-color: transparent;
  cursor: default;
  min-height: 0;
}

.cal__cell--empty:hover {
  background-color: transparent;
  border-color: transparent;
}

.cal__cell--fast {
  background-color: var(--surface);
  border-style: dashed;
}

.cal__cell--today {
  border-color: var(--foreground);
}

.cal__day {
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cal__gee {
  font-family: "Noto Sans Ethiopic", "Nyala", "Abyssinica SIL", "Kefa", var(--font-sans);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

.cal__gc {
  color: var(--subtle);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
}

.cal__marks {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-top: auto;
  padding-top: 0.125rem;
}

.cal__mark {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.5625rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal__mark[data-kind="fast"] {
  color: var(--subtle);
}

.cal__mark[data-kind="feast"] {
  color: var(--foreground);
  font-weight: 500;
}

.cal__mark[data-kind="national"] {
  color: var(--muted);
}

.cal__mark--weekly {
  color: var(--subtle);
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  list-style: none;
}

.cal__legend li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.cal__swatch {
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.1875rem;
  background-color: var(--background);
}

.cal__swatch--today {
  border-color: var(--foreground);
}

.cal__swatch--feast {
  background-color: var(--foreground);
  border-color: var(--foreground);
}

.cal__swatch--fast {
  background-color: var(--surface);
  border-style: dashed;
}

@media (max-width: 479px) {
  .cal__grid {
    gap: 0.1875rem;
  }

  .cal__cell {
    min-height: 3.75rem;
    padding: 0.25rem 0.1875rem;
  }

  .cal__day {
    font-size: 0.75rem;
  }

  .cal__gee {
    font-size: 0.6875rem;
  }

  .cal__mark {
    font-size: 0.5rem;
  }
}

.conv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 0.5rem;
}

.conv-swap {
  display: flex;
  justify-content: center;
  padding-block: 0.5rem;
}

.switch {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
}

.switch__track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.switch__thumb {
  position: absolute;
  left: 2px;
  width: 0.875rem;
  height: 0.875rem;
  background-color: var(--muted);
  border-radius: 999px;
  transition: transform var(--speed) var(--ease), background-color var(--speed) var(--ease);
}

.switch input:checked + .switch__track {
  background-color: var(--surface-hover);
  border-color: var(--foreground);
}

.switch input:checked + .switch__track .switch__thumb {
  background-color: var(--foreground);
  transform: translateX(1rem);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

.switch__text {
  color: var(--muted);
  font-size: 0.8125rem;
}

.event__name {
  display: block;
  font-weight: 500;
}

.event__am {
  margin-left: 0.25rem;
  color: var(--muted);
  font-weight: 400;
}

.event__sub {
  margin-left: 0.25rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 400;
}

.event__detail {
  display: block;
  margin-top: 0.1875rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
}

.breakdown .event__name,
.breakdown .event__am,
.breakdown .event__sub,
.breakdown .event__detail {
  text-transform: none;
  letter-spacing: normal;
}

.breakdown tbody tr[data-active="true"] td,
.breakdown tbody tr[data-active="true"] th {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

.hist__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hist__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding-inline: 0.375rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.hist__list {
  display: flex;
  flex-direction: column;
  margin-top: 0.75rem;
  list-style: none;
}

.hist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block: 0.875rem;
}

.hist__item + .hist__item {
  border-top: 1px solid var(--border);
}

.hist__body {
  flex: 1 1 auto;
  min-width: 0;
}

.hist__title {
  font-size: 0.875rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.hist__meta {
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
}

.hist__lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
  list-style: none;
}

.hist__line {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.hist__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.hist__actions .btn {
  gap: 0.375rem;
}

.hist__empty {
  margin-top: 0.75rem;
  padding: 1rem;
  background-color: var(--background);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-control);
  color: var(--subtle);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.hist__empty:empty {
  display: none;
}

.hist__foot {
  margin-top: 0.875rem;
}

.hist__foot .btn {
  width: 100%;
}

.install-btn .icon {
  width: 1rem;
  height: 1rem;
}

/* Tool workspaces for the developer, image, and QR studios. */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
  }
}

.studio-col {
  min-width: 0;
}

.studio-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.code-area {
  width: 100%;
  min-height: 11rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  tab-size: 2;
}

.code-area:focus {
  outline: none;
  border-color: var(--border-strong);
}

.code-area--tall {
  min-height: 17rem;
}

.code-area--short {
  min-height: 6.5rem;
}

.code-out {
  max-height: 20rem;
  overflow: auto;
  padding: 0.75rem 0.875rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-out--highlight {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-out mark {
  padding: 0.0625rem 0;
  background-color: rgba(250, 250, 250, 0.16);
  border-radius: 0.125rem;
  color: inherit;
}

.code-out mark.is-group {
  background-color: rgba(234, 179, 8, 0.24);
}

.code-line {
  display: block;
  white-space: pre;
}

.code-line--error {
  background-color: rgba(239, 68, 68, 0.14);
  box-shadow: inset 2px 0 0 var(--strength-weak);
}

.code-line__no {
  display: inline-block;
  width: 2.5rem;
  color: var(--subtle);
  user-select: none;
}

.code-line__text {
  color: var(--foreground);
}

.code-line--error .code-line__text {
  background-color: rgba(239, 68, 68, 0.1);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 1rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.check__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--subtle);
}

.check--on .check__icon {
  color: var(--strength-strong);
}

.check--off .check__icon {
  color: var(--strength-weak);
}

.check--on {
  color: var(--foreground);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}

.stat {
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.stat__label {
  display: block;
  color: var(--subtle);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat__value {
  display: block;
  margin-top: 0.1875rem;
  color: var(--foreground);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.stat--good .stat__value {
  color: var(--strength-strong);
}

.stat--warn .stat__value {
  color: var(--strength-medium);
}

/* Stacked gross revenue split for the freelance rate calculator. Flat neutral
   fills only, so the bar stays readable in forced-colors mode. */
.split-bar {
  display: flex;
  height: 1.5rem;
  overflow: hidden;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.split-bar__seg {
  display: block;
  height: 100%;
  min-width: 2px;
  border-right: 1px solid var(--background);
  transition: width var(--speed) var(--ease);
}

.split-bar__seg:last-child {
  border-right: 0;
}

.split-bar__seg--net {
  background-color: var(--foreground);
}

.split-bar__seg--tax {
  background-color: var(--muted);
}

.split-bar__seg--expense {
  background-color: var(--border-strong);
}

.split-legend {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.split-legend__row {
  display: grid;
  grid-template-columns: 0.625rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.625rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-size: 0.8125rem;
}

.split-legend__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.1875rem;
}

.split-legend__dot--net {
  background-color: var(--foreground);
}

.split-legend__dot--tax {
  background-color: var(--muted);
}

.split-legend__dot--expense {
  background-color: var(--border-strong);
}

.split-legend__label {
  color: var(--muted);
}

.split-legend__value,
.split-legend__share {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.split-legend__share {
  min-width: 3.25rem;
  color: var(--subtle);
  text-align: right;
}

.compare-empty {
  color: var(--subtle);
  font-style: normal;
}

.compare-note {
  color: var(--subtle);
  font-size: 0.75rem;
}

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-image: linear-gradient(45deg, #131316 25%, transparent 25%),
    linear-gradient(-45deg, #131316 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #131316 75%),
    linear-gradient(-45deg, transparent 75%, #131316 75%);
  background-size: 1rem 1rem;
  background-position: 0 0, 0 0.5rem, 0.5rem -0.5rem, -0.5rem 0;
}

.preview-stage canvas,
.preview-stage svg,
.preview-stage img {
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}

.preview-stage--pixel img {
  image-rendering: pixelated;
}

.crop-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  touch-action: none;
  cursor: grab;
}

.crop-stage[data-drag="true"] {
  cursor: grabbing;
}

.crop-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.crop-stage__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crop-stage__grid span {
  position: absolute;
  background-color: rgba(250, 250, 250, 0.28);
}

.crop-stage__grid span:nth-child(1),
.crop-stage__grid span:nth-child(2) {
  top: 0;
  bottom: 0;
  width: 1px;
}

.crop-stage__grid span:nth-child(1) { left: 33.333%; }
.crop-stage__grid span:nth-child(2) { left: 66.666%; }

.crop-stage__grid span:nth-child(3),
.crop-stage__grid span:nth-child(4) {
  left: 0;
  right: 0;
  height: 1px;
}

.crop-stage__grid span:nth-child(3) { top: 33.333%; }
.crop-stage__grid span:nth-child(4) { top: 66.666%; }

.icon-sizes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}

.icon-size {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.icon-size__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 6.5rem;
  padding: 0.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-image: linear-gradient(45deg, #131316 25%, transparent 25%),
    linear-gradient(-45deg, #131316 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #131316 75%),
    linear-gradient(-45deg, transparent 75%, #131316 75%);
  background-size: 0.75rem 0.75rem;
  background-position: 0 0, 0 0.375rem, 0.375rem -0.375rem, -0.375rem 0;
}

.icon-size__stage img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  object-fit: contain;
}

.icon-size__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.icon-size__name {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.icon-size__note {
  color: var(--subtle);
  font-size: 0.625rem;
}

.theme-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theme-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 0.75rem 0 0.375rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.theme-swatch:hover {
  border-color: var(--border-strong);
  color: var(--foreground);
}

.theme-swatch[aria-pressed="true"] {
  border-color: var(--foreground);
  color: var(--foreground);
}

.theme-swatch__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.625rem;
  font-weight: 600;
}

.color-row + .color-row {
  margin-top: 0.75rem;
}

.color-row__text {
  flex: 1 1 auto;
  min-width: 0;
}

.color-row__text input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.leaf-unit {
  display: block;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 15rem;
  margin-top: 0.75rem;
  overflow-y: auto;
}

.match-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.match-item__at {
  min-width: 2.25rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.match-item__body {
  min-width: 0;
  flex: 1 1 auto;
}

.match-item__value {
  color: var(--foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.match-item__groups {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.segmented--wrap {
  display: flex;
  flex-wrap: wrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.file-row__body {
  min-width: 0;
  flex: 1 1 auto;
}

.file-row__name {
  display: block;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.file-row__meta {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.saved-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Tool workspaces for the forex, network, weather, and wheel pages. */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding: 0.75rem 0.875rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.notice .icon {
  margin-top: 0.1875rem;
  color: var(--subtle);
}

.notice--strong {
  border-color: var(--border-strong);
  color: var(--foreground);
}

.notice--inline {
  margin-top: 0.75rem;
}

.indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.indicator__dot {
  width: 0.4375rem;
  height: 0.4375rem;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: var(--subtle);
}

.indicator--ok .indicator__dot {
  background-color: var(--strength-strong);
}

.indicator--warn .indicator__dot {
  background-color: var(--strength-medium);
}

.indicator--warn {
  color: var(--foreground);
}

.value-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Global forex cross-rate board. */
.matrix-wrap {
  max-width: 100%;
  margin-top: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.matrix th,
.matrix td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.matrix thead th {
  position: sticky;
  top: 0;
  color: var(--subtle);
  background-color: var(--surface);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.matrix tbody th {
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
}

.matrix td[data-self="true"] {
  color: var(--subtle);
}

.matrix td[data-base="true"] {
  color: var(--foreground);
  font-weight: 600;
}

/* IP and network inspector. */
.ip-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.ip-hero__label {
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ip-hero__value {
  margin-top: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.125rem, 4vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.ip-hero__meta {
  margin-top: 0.5rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

.ip-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ip-value {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ip-reasons {
  margin-top: 1rem;
  list-style: none;
}

/* Weather and UV guide. */
.wx-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.wx-now__icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  color: var(--muted);
}

.wx-now__temp {
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.wx-now__meta {
  min-width: 0;
  flex: 0 1 auto;
  margin-right: auto;
}

.wx-now__place {
  font-size: 0.9375rem;
  font-weight: 500;
}

.wx-now__desc {
  margin-top: 0.1875rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.wx-now__time {
  margin-top: 0.1875rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.uv-gauge {
  margin-top: 1.25rem;
  padding: 1.125rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.uv-gauge__track {
  display: flex;
  gap: 2px;
}

.uv-gauge__seg {
  height: 0.5rem;
  flex: 1 1 0;
  background-color: var(--surface-hover);
}

.uv-gauge__seg[data-on="true"] {
  background-color: var(--foreground);
}

.uv-gauge__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.375rem;
  color: var(--subtle);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
}

.uv-gauge__read {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.875rem;
}

.uv-gauge__value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.uv-gauge__band {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: right;
}

.uv-advice {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.wx-forecast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .wx-forecast {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .wx-forecast {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.wx-day {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.wx-day__date {
  font-size: 0.75rem;
  font-weight: 500;
}

.wx-day__date .sub {
  display: block;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 400;
}

.wx-day__icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--muted);
}

.wx-day__desc {
  min-height: 2.5rem;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.wx-day__temps {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  font-variant-numeric: tabular-nums;
}

.wx-day__hi {
  font-size: 0.9375rem;
  font-weight: 600;
}

.wx-day__lo {
  color: var(--subtle);
  font-size: 0.8125rem;
}

.wx-day__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

/* Decision wheel. */
.spin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .spin-grid {
    grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
    align-items: start;
  }
}

.spin-stage {
  position: relative;
  width: 100%;
  max-width: 21rem;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

.spin-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.spin-pointer {
  position: absolute;
  top: -0.375rem;
  left: 50%;
  width: 1.5rem;
  height: 1.75rem;
  color: var(--foreground);
  transform: translateX(-50%);
}

.spin-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--foreground);
  transform: translate(-50%, -50%);
}

.spin-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.choice-row__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.choice-row__count {
  flex-shrink: 0;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

.add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.5rem;
}

.spin-dialog {
  width: min(24rem, calc(100% - 2rem));
  text-align: center;
}

.spin-dialog__eyebrow {
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spin-dialog__winner {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.spin-dialog__meta {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.spin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.spin-actions .btn {
  flex: 1 1 10rem;
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -1rem;
  width: 0.375rem;
  height: 0.625rem;
}

/* Site-wide announcement banner. Driven by platform_settings in js/main.js. */
.announce {
  border-bottom: 1px solid var(--border);
  background-color: var(--surface);
}

.announce__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 0.625rem;
  text-align: center;
}

.announce__icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--muted);
}

.announce__text {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Tool maintenance. Marks a card in the home grid as unavailable and blocks
   the card, its title link and its launch button. */
.card[data-maintenance="true"] {
  border-style: dashed;
  background-color: var(--surface);
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.3);
}

.card[data-maintenance="true"]:hover {
  border-color: var(--border);
  background-color: var(--surface);
}

.card[data-maintenance="true"] .card--linked:hover {
  background-color: var(--surface);
}

.card[data-maintenance="true"] .card__link,
.card[data-maintenance="true"] .card__action {
  pointer-events: none;
  color: var(--subtle);
  cursor: not-allowed;
  text-decoration: none;
}

.card[data-maintenance="true"] .card__action .icon {
  display: none;
}

.card__maint {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.375rem;
  background-color: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.card__maint-dot {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #fbbf24;
  animation: maint-pulse 1.6s ease-in-out infinite;
}

@keyframes maint-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__maint-dot {
    animation: none;
  }
}

/* Toast shown when a maintenance card is clicked instead of opening the tool. */
.maint-notice {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 120;
  max-width: min(26rem, calc(100% - 2.5rem));
  padding: 0.875rem 1rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-control);
  background-color: var(--surface);
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.5;
  transform: translateX(-50%);
}

.maint-notice[hidden] {
  display: none;
}

/* Full page guard shown when a maintenance tool is opened directly. */
.maint-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: rgba(9, 9, 11, 0.94);
}

.maint-gate__panel {
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  text-align: center;
}

.maint-gate__panel .card__maint {
  margin-top: 0;
}

.maint-gate__title {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.maint-gate__text {
  margin-top: 0.625rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.maint-gate__back {
  margin-top: 1.5rem;
}

body.is-maintenance {
  overflow: hidden;
}

/* Admin console (4229.html).
   A dual column app shell: a sticky top bar, an icon backed sidebar that
   collapses to a rail on desktop and slides in as a drawer below 1024px, and
   one panel at a time. Flat neutral fills only, no gradients. */
.console {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* Top bar --------------------------------------------------------------- */
.console__bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
}

.console__bar-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--header-h);
  padding: 0.5rem 1rem;
}

@media (min-width: 1024px) {
  .console__bar-inner {
    padding-inline: 1.5rem;
  }
}

.console__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--surface);
}

.console__brand img {
  width: 1.25rem;
  height: 1.25rem;
}

.console__brand-name {
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .console__brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border-width: 0;
  }
}

/* Below 900px the wordmark gives its space to the section name, and below
   640px the bar buttons collapse to their icons. The labels stay in the
   accessibility tree, so every control keeps its name at every width. */
@media (max-width: 899px) {
  .console__brand {
    display: none;
  }
}

@media (max-width: 639px) {
  .console__bar-inner {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }

  .console__action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border-width: 0;
  }

  .console__actions {
    gap: 0.375rem;
  }

  .console__actions .btn {
    padding-inline: 0.625rem;
  }
}

.console__heading {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.console__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  padding: 0;
  background-color: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.console__icon-btn:hover {
  background-color: var(--surface);
  border-color: var(--border-strong);
  color: var(--foreground);
}

.console__collapse-toggle {
  display: none;
}

@media (min-width: 1024px) {
  .console__drawer-toggle {
    display: none;
  }

  .console__collapse-toggle {
    display: inline-flex;
  }

  /* The same panel glyph, mirrored, reads as the other direction. */
  .console[data-collapsed="true"] .console__collapse-toggle .icon {
    transform: scaleX(-1);
  }
}

/* Signed in administrator badge. */
.console__admin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 12rem;
  padding: 0.1875rem 0.625rem 0.1875rem 0.1875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface);
}

.console__admin-mark {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: var(--foreground);
  color: var(--background);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.console__admin-name {
  min-width: 0;
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .console__admin {
    padding-inline: 0.1875rem;
  }

  .console__admin-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border-width: 0;
  }
}

/* Toasts ---------------------------------------------------------------- */
.toasts {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: max(1rem, env(safe-area-inset-right));
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(21rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.75rem 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: toast-in 160ms var(--ease);
}

.toast[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.4);
}

.toast[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.45);
}

.toast__icon {
  margin-top: 0.125rem;
  color: var(--muted);
}

.toast[data-tone="success"] .toast__icon {
  color: var(--strength-strong);
}

.toast[data-tone="error"] .toast__icon {
  color: var(--strength-weak);
}

.toast__text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--foreground);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  margin: -0.25rem -0.25rem 0 0;
  padding: 0;
  background-color: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--subtle);
  cursor: pointer;
}

.toast__close:hover {
  background-color: var(--surface-hover);
  color: var(--foreground);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

/* Body, sidebar, main --------------------------------------------------- */
.console__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1 0 auto;
  align-items: start;
}

@media (min-width: 1024px) {
  .console__body {
    grid-template-columns: 15.5rem minmax(0, 1fr);
  }

  .console[data-collapsed="true"] .console__body {
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }
}

.console__side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 0.75rem 2rem;
  background-color: var(--background);
}

@media (min-width: 1024px) {
  .console__side {
    position: sticky;
    top: var(--header-h);
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    border-right: 1px solid var(--border);
  }
}

@media (max-width: 1023.98px) {
  .console__side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 70;
    width: min(17rem, 82vw);
    overflow-y: auto;
    visibility: hidden;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform var(--speed) var(--ease), visibility var(--speed) var(--ease);
  }

  .console[data-drawer="open"] .console__side {
    visibility: visible;
    transform: none;
  }
}

.console__scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background-color: rgba(9, 9, 11, 0.72);
}

/* The scrim only ever belongs to the drawer. On desktop the sidebar is a
   column, so the scrim is left out of the layout entirely. */
@media (max-width: 1023.98px) {
  .console[data-drawer="open"] .console__scrim {
    display: block;
  }
}

/* Signed out and not an administrator: no navigation to offer, and no
   controls that only mean something once the console is open. */
.console[data-state="locked"] .console__side,
.console[data-state="locked"] .console__scrim,
.console[data-state="locked"] .console__drawer-toggle,
.console[data-state="locked"] .console__collapse-toggle,
.console[data-state="locked"] [data-app-only] {
  display: none;
}

.console[data-state="locked"] .console__body {
  grid-template-columns: minmax(0, 1fr);
}

.console__nav-label {
  padding-inline: 0.625rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console__nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.navitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5625rem 0.625rem;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.navitem:hover {
  background-color: var(--surface);
  color: var(--foreground);
}

.navitem[aria-current="true"] {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--foreground);
}

.navitem__icon {
  flex-shrink: 0;
  color: var(--subtle);
}

.navitem[aria-current="true"] .navitem__icon {
  color: var(--foreground);
}

.navitem__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.navitem__count {
  flex-shrink: 0;
  min-width: 1.375rem;
  padding-inline: 0.375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25rem;
  text-align: center;
}

.navitem[data-empty="true"] .navitem__count {
  color: var(--subtle);
  opacity: 0.6;
}

/* Collapsed rail keeps every accessible name, so the sidebar stays usable. */
.console[data-collapsed="true"] .navitem__label,
.console[data-collapsed="true"] .navitem__count,
.console[data-collapsed="true"] .console__nav-label,
.console[data-collapsed="true"] .console__side-note,
.console[data-collapsed="true"] .console__side-foot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border-width: 0;
}

.console[data-collapsed="true"] .navitem {
  justify-content: center;
  padding-inline: 0;
}

.console__side-foot {
  margin-top: auto;
  padding: 0.875rem 0.625rem 0;
  border-top: 1px solid var(--border);
}

.console__side-note {
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.6;
}

.console__main {
  min-width: 0;
}

/* Panels ---------------------------------------------------------------- */
.panel {
  padding: 1.5rem 1rem 3rem;
}

@media (min-width: 1024px) {
  .panel {
    padding: 2rem 2rem 4rem;
  }
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel__title {
  font-size: 1.25rem;
}

.panel__text {
  margin-top: 0.5rem;
  max-width: 46rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.panel__count {
  margin: 0.875rem 0 0.75rem;
  color: var(--subtle);
  font-size: 0.8125rem;
}

.panel__note {
  margin-top: 1rem;
  max-width: 46rem;
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.6;
}

.panel__note code {
  color: var(--muted);
}

.block {
  margin-top: 2rem;
}

.block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.block__title {
  font-size: 0.9375rem;
}

.block__head .field__hint {
  margin-top: 0.375rem;
  max-width: 42rem;
}

.block__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.muted-note {
  color: var(--subtle);
  font-size: 0.8125rem;
}

/* Metric cards on the overview. Each one opens the section it counts. */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.metric:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.metric__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--background);
  color: var(--muted);
}

.metric__label {
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric__value {
  color: var(--foreground);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.metric__foot {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Toolbar: a search field beside a row of filter pills. */
.toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.toolbar__field {
  flex: 1 1 16rem;
  min-width: 0;
}

.toolbar__field .field__input {
  height: 2.5rem;
}

.toolbar__chips {
  margin-top: 0;
}

/* Status pills. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.5rem;
  padding-inline: 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1;
  white-space: nowrap;
}

.pill__dot {
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: currentColor;
}

.pill[data-tone="pending"] {
  border-color: rgba(234, 179, 8, 0.35);
  color: #facc15;
}

.pill[data-tone="ok"] {
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.pill[data-tone="bad"] {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.pill[data-tone="mute"] {
  color: var(--subtle);
}

/* Entry rows: feedback submissions and reviews. */
.rows {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.875rem 1.25rem;
  padding: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.row__main {
  flex: 1 1 22rem;
  min-width: 0;
}

.row__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.row__title {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
}

.row__text {
  margin-top: 0.375rem;
  max-width: 44rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.875rem;
  margin-top: 0.75rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

.row__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row__meta-item .icon {
  width: 0.8125rem;
  height: 0.8125rem;
}

.row__who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.row__author {
  color: var(--muted);
  font-size: 0.8125rem;
}

.row__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.row__danger[data-armed="true"] {
  background-color: var(--surface-hover);
  border-color: var(--strength-weak);
  color: var(--foreground);
}

/* Rating stars are the foreground colour, not a rating hue. A filled star is
   solid white and an empty one is a white outline, so the rating still reads at a
   glance and the page keeps to dark, white and grey. */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  color: var(--foreground);
}

.star__icon {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
}

/* The console matches the public reviews page: a filled rating is the foreground
   colour, so stars read white on the dark background rather than picking up a
   hue the rest of the site does not use. */
.star[data-on="true"] .star__icon {
  fill: currentColor;
  stroke: currentColor;
}

/* Business directory cards. */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.75rem;
}

.tcard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.tcard__count {
  color: var(--subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.tcard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.tcard__name {
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

.tcard__text {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tcard__meta {
  color: var(--subtle);
  font-size: 0.75rem;
}

.tcard__foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  margin-top: auto;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

.tcard__foot .admin-table__control {
  justify-content: space-between;
}

.tcard__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  color: var(--foreground);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.tcard__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tcard__link .icon {
  width: 0.8125rem;
  height: 0.8125rem;
  color: var(--subtle);
}

.tcard__link--none {
  color: var(--subtle);
}

/* Banner card and its live preview. The preview reuses the real .announce
   markup so it renders exactly what the home page renders. */
.banner-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.banner-preview {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.banner-preview__label {
  display: block;
  padding: 0.4375rem 0.75rem;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.banner-preview__frame {
  background-color: var(--background);
}

.banner-preview__none {
  padding: 1.25rem 1rem;
  border: 1px dashed var(--border);
  border-top: 0;
  color: var(--subtle);
  font-size: 0.8125rem;
  text-align: center;
}

.banner-preview__note {
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border);
  background-color: var(--background);
  color: var(--subtle);
  font-size: 0.75rem;
}

/* Tool maintenance grid: one card per tool, two columns from 900px. */
.maint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .maint-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mcard {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.mcard[data-down="true"] {
  border-color: rgba(245, 158, 11, 0.35);
}

.mcard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
}

.mcard__name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}

.mcard__state {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.mcard__dot {
  width: 0.4375rem;
  height: 0.4375rem;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: var(--strength-strong);
}

.mcard__dot[data-tone="down"] {
  background-color: var(--strength-medium);
}

.mcard__kill {
  flex-shrink: 0;
}

.mcard__kill .switch {
  margin-top: 0;
}

.mcard__kill .switch__text {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Schedule window accordion. */
.window {
  border-top: 1px solid var(--border);
}

.window > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
  list-style: none;
}

.window > summary::-webkit-details-marker {
  display: none;
}

.window > summary:hover {
  color: var(--foreground);
}

.window__chev {
  transition: transform var(--speed) var(--ease);
}

.window[open] .window__chev {
  transform: rotate(180deg);
}

.window__badge {
  margin-left: auto;
}

.window__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.window__times {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.625rem;
}

@media (min-width: 520px) {
  .window__times {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.window__label {
  display: block;
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.window__time {
  width: 100%;
  height: 2.25rem;
  margin-top: 0.3125rem;
  padding: 0 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  color: var(--foreground);
  font-size: 0.8125rem;
  color-scheme: dark;
  appearance: auto;
  -webkit-appearance: auto;
}

.window__time:hover {
  border-color: var(--border-strong);
}

.window__time:focus {
  outline: none;
  border-color: var(--border-strong);
}

.window__time::-webkit-calendar-picker-indicator {
  filter: invert(0.65);
  cursor: pointer;
}

.window__state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.window__status {
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.5;
}

.window__status[data-state="active"] {
  color: #fbbf24;
}

.window__status[data-state="pending"] {
  color: var(--foreground);
}

.window__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.window__arm {
  margin-top: 0;
}

.window__arm .switch__text {
  font-size: 0.8125rem;
}

.duration {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--background);
  color: var(--muted);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* User directory table. */
.admin-table-wrap {
  margin-top: 0.25rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.admin-table tbody tr:last-child th,
.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table th {
  background-color: var(--background);
  color: var(--subtle);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td {
  color: var(--muted);
}

.admin-table__account {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 14rem;
}

.uavatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--background);
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.admin-table__mail {
  display: block;
  color: var(--foreground);
  overflow-wrap: anywhere;
}

.admin-table__name {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

.admin-table__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.admin-table__created {
  white-space: nowrap;
}

.admin-table__control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-table__control .switch {
  margin-top: 0;
}

.admin-table__hint {
  margin-top: 0.25rem;
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: 16rem;
}

/* Dialogs: the create target drawer and the two step confirmations. */
.sheet {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--foreground);
  font: inherit;
}

.sheet::backdrop {
  background-color: rgba(9, 9, 11, 0.8);
}

.sheet__inner {
  padding: 1.5rem;
}

.sheet__title {
  font-size: 1.125rem;
}

.sheet__text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.sheet__form {
  margin-top: 1.25rem;
}

.sheet__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.sheet__subject {
  display: block;
  margin-top: 0.75rem;
  color: var(--foreground);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* Sign in and not an administrator. */
.admin-gate {
  display: flex;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

@media (min-width: 1024px) {
  .admin-gate {
    padding: 4rem 2rem 6rem;
  }
}

.admin-gate__card {
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--surface);
}

.admin-gate__card--denied {
  text-align: center;
}

.admin-gate__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--background);
  color: var(--muted);
}

.admin-gate__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.admin-gate__icon--error {
  color: var(--strength-weak);
}

.admin-gate__title {
  margin-top: 1rem;
  font-size: 1.25rem;
}

.admin-gate__sub {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.admin-gate__form {
  margin-top: 1.5rem;
}

.admin-gate__note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-size: 0.75rem;
  line-height: 1.6;
}

.admin-gate__note code {
  color: var(--muted);
}

.admin-alert {
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background-color: var(--background);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.admin-alert[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.5);
  color: var(--foreground);
}

.admin-alert[data-tone="success"] {
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--foreground);
}

.admin-alert[data-tone="warning"] {
  border-color: var(--border-strong);
  color: var(--foreground);
}

/* Account totals, above the directory table. Reads the same way as the metric
   cards on the overview, at a smaller size. */
.tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.tally__item {
  padding: 0.625rem 0.75rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

.tally__value {
  display: block;
  color: var(--foreground);
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tally__label {
  display: block;
  margin-top: 0.125rem;
  color: var(--subtle);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-table__account-cell[data-banned="true"] .admin-table__mail,
.admin-table__account-cell[data-banned="true"] .uavatar {
  color: var(--subtle);
}

.admin-table__account-cell[data-banned="true"] .uavatar {
  background-color: var(--background);
  border-style: dashed;
}
