:root {
  --bg: #080a09;
  --panel: #101412;
  --elevated: #151a18;
  --border: rgba(255, 255, 255, 0.065);
  --text: #eef3f0;
  --muted: #8f9f96;
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.12);
  --accent-dim: #0f766e;
  --danger: #f87171;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --content-max: 42rem;
  --nav-pad-x: clamp(1rem, 4vw, 2rem);
  --locked-width: min(88rem, 100%);
  --fs-radius: 14px;
  --fs-radius-sm: 10px;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 0% -15%, rgba(94, 234, 212, 0.11), transparent 52%),
    radial-gradient(ellipse 80% 55% at 100% 5%, rgba(15, 118, 110, 0.18), transparent 48%),
    radial-gradient(ellipse 70% 45% at 70% 100%, rgba(94, 234, 212, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 15% 55%, rgba(255, 255, 255, 0.03), transparent 45%),
    var(--bg);
}

body.page-model--1::before {
  background:
    radial-gradient(ellipse 90% 60% at 0% 0%, rgba(94, 234, 212, 0.14), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 30%, rgba(15, 118, 110, 0.12), transparent 45%),
    var(--bg);
}

body.page-model--2::before {
  background:
    radial-gradient(ellipse 85% 55% at 100% -10%, rgba(252, 211, 77, 0.08), transparent 48%),
    radial-gradient(ellipse 70% 50% at 0% 40%, rgba(94, 234, 212, 0.1), transparent 50%),
    var(--bg);
}

body.page-model--3::before {
  background:
    radial-gradient(ellipse 90% 60% at 50% -5%, rgba(167, 139, 250, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 45% at 0% 80%, rgba(94, 234, 212, 0.08), transparent 48%),
    var(--bg);
}

body.page-history::before {
  background:
    radial-gradient(ellipse 100% 55% at 50% 0%, rgba(94, 234, 212, 0.1), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(15, 118, 110, 0.14), transparent 50%),
    var(--bg);
}

body.page-home::before {
  background:
    radial-gradient(ellipse 95% 60% at 12% -8%, rgba(94, 234, 212, 0.12), transparent 52%),
    radial-gradient(ellipse 75% 50% at 92% 18%, rgba(15, 118, 110, 0.16), transparent 48%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 255, 255, 0.025), transparent 50%),
    var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Sticky header: brand left, nav right —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 20, 18, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav {
  width: var(--locked-width);
  margin: 0 auto;
  padding: 0 var(--nav-pad-x);
}

.site-nav-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.65rem 0;
}

.site-brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  font-optical-sizing: auto;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}
.site-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem 0.35rem;
}

.site-nav-list li {
  margin: 0;
  padding: 0;
  line-height: 1;
}

.site-nav-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav-link:hover {
  text-decoration: none;
}

.site-nav-link--text {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 0.45rem 0.55rem;
}
.site-nav-link--text:hover {
  color: var(--text);
}

.site-nav-link--label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  padding: 0.5rem 0.55rem;
}
.site-nav-link--label:hover {
  color: var(--text);
}

.site-nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.site-nav-link--text.is-active {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.site-nav-link:focus-visible,
.site-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .site-nav-bar {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
  }
  .site-nav-list {
    width: 100%;
    justify-content: center;
  }
}

/* —— Main: full-width canvas —— */
.site-main {
  flex: 1;
  width: 100%;
}

.site-main--canvas {
  max-width: none;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.75rem) var(--nav-pad-x) clamp(2rem, 5vw, 3.5rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Shared: type, tiles, links —— */
.fs-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2.5rem, 8vw, 4.25rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0;
  color: var(--text);
}

.fs-lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 38rem;
}

.fs-lead strong {
  color: var(--text);
  font-weight: 600;
}

.fs-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
}

.fs-kicker--row {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.fs-prose {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--muted);
}

.fs-prose--tight {
  font-size: 0.95rem;
}

.fs-prose strong {
  color: var(--text);
  font-weight: 600;
}

.fs-list {
  margin: 0;
  padding-inline-start: 1.35rem;
  list-style-position: outside;
  color: var(--muted);
  line-height: 1.62;
  font-size: 0.92rem;
}

.fs-list li + li {
  margin-top: 0.35rem;
}

.fs-code {
  font-size: 0.88em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.1em 0.38em;
  border-radius: 5px;
}

.fs-tile {
  text-align: left;
  padding: clamp(1.1rem, 2.5vw, 1.45rem) clamp(1.15rem, 2.8vw, 1.5rem);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.fs-tile--accent {
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.1) 0%, var(--elevated) 55%);
  border-color: rgba(94, 234, 212, 0.14);
}

.fs-tile--tell {
  border-color: rgba(94, 234, 212, 0.12);
}

.fs-tile--reply {
  background: var(--panel);
}

.fs-tile--wide {
  grid-column: 1 / -1;
}

/* —— Home: bento grid —— */
.fs-home {
  width: 100%;
  max-width: var(--locked-width);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.5rem);
  grid-template-columns: 1fr;
}

.fs-home__masthead {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: start;
  padding-bottom: clamp(0.35rem, 1.2vw, 0.65rem);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(0.15rem, 0.8vw, 0.35rem);
}

.fs-home__title-block {
  position: relative;
  min-width: 0;
}

.fs-home__tagline {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.85;
}

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

  .fs-home__masthead {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .fs-home__tell {
    grid-column: 1;
  }

  .fs-home__reply {
    grid-column: 2;
  }

  .fs-home__expert,
  .fs-home__compare,
  .fs-home__dialog,
  .fs-home__closing,
  .fs-home__actions {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .fs-home .fs-tile,
  .fs-home__compare .fs-compare__item,
  .fs-quote,
  .fs-home__masthead .fs-lead {
    animation: fs-rise 0.55s ease backwards;
  }

  .fs-home__tell {
    animation-delay: 0.04s;
  }

  .fs-home__reply {
    animation-delay: 0.1s;
  }

  .fs-home__expert {
    animation-delay: 0.14s;
  }

  .fs-home__compare {
    animation-delay: 0.08s;
  }

  .fs-home__dialog {
    animation-delay: 0.16s;
  }

  .fs-home__closing {
    animation-delay: 0.2s;
  }

  .fs-home__actions {
    animation-delay: 0.22s;
  }
}

@keyframes fs-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-home .fs-tile,
  .fs-home__compare .fs-compare__item,
  .fs-quote,
  .fs-home__masthead .fs-lead {
    animation: none;
  }
}

.fs-compare {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

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

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

.fs-compare__item {
  margin: 0;
  padding: 1rem 1.05rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius-sm);
}

.fs-compare__item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fs-home__compare {
  padding: clamp(1.1rem, 2.5vw, 1.45rem) clamp(1.15rem, 2.8vw, 1.5rem);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.fs-home__compare .fs-kicker--row {
  margin-bottom: 1.1rem;
  padding-bottom: 0.65rem;
}

.fs-quote {
  margin: 0;
  padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.15rem, 3vw, 1.75rem);
  text-align: left;
  background: linear-gradient(110deg, rgba(0, 0, 0, 0.35) 0%, var(--elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius);
  border-left: 4px solid var(--accent);
}

.fs-quote__line {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--muted);
}

.fs-quote__line strong {
  color: var(--text);
}

.fs-quote__note {
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.84rem;
  font-style: italic;
  color: var(--muted);
  opacity: 0.95;
}

.fs-home__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.7rem;
  padding: clamp(1rem, 2.5vw, 1.35rem) 0 0;
  margin-top: clamp(0.25rem, 1vw, 0.5rem);
  border-top: 1px solid var(--border);
}

.fs-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.fs-pill:hover {
  text-decoration: none;
  border-color: rgba(94, 234, 212, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
}

.fs-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.fs-pill--ghost {
  background: transparent;
  color: var(--accent);
}

.fs-pill--ghost:hover {
  background: var(--accent-soft);
}

/* —— Model pages: split canvas —— */
.fs-model {
  width: 100%;
  max-width: var(--locked-width);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.fs-model__hero {
  text-align: left;
}

.fs-model__intro {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 32rem;
}

.fs-model__chip {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}

.fs-model__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--text);
}

.fs-model__use {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 28rem;
}

.fs-model__intro .fs-model__use {
  max-width: none;
}

.fs-model__work {
  text-align: left;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius);
  min-width: 0;
}

.fs-model__h2 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.fs-model__form {
  max-width: none;
}

@media (min-width: 880px) {
  .fs-model {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .fs-model__hero {
    position: sticky;
    top: calc(3.25rem + 1rem);
    padding-right: 0.5rem;
  }
}

.fs-model--leaf .fs-model__form {
  max-width: 32rem;
}

.fs-dropzone-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.fs-dropzone {
  position: relative;
  min-height: 10rem;
  border: 1px dashed var(--border);
  border-radius: var(--fs-radius-sm);
  background: var(--elevated);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fs-dropzone:hover,
.fs-dropzone:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.35);
}

.fs-dropzone.is-dragover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--elevated);
  box-shadow: inset 0 0 0 2px rgba(94, 234, 212, 0.4);
}

.fs-dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.fs-dropzone__inner {
  position: relative;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 10rem;
  padding: 1.25rem 1rem;
  text-align: center;
}

.fs-dropzone__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.fs-dropzone__sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.fs-dropzone__browse {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fs-dropzone__file {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  word-break: break-all;
  max-width: 100%;
}

.fs-mt {
  margin-top: 0.75rem;
}

/* —— History: full-width band + table —— */
.fs-history {
  width: 100%;
  max-width: var(--locked-width);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.fs-history__head {
  display: grid;
  gap: 0.75rem 2rem;
  text-align: left;
}

@media (min-width: 720px) {
  .fs-history__head {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: end;
  }
}

.fs-history__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.1;
  color: var(--text);
}

.fs-history__use {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  padding: 0.85rem 1rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--fs-radius-sm);
}

.fs-foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.fs-foot-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.fs-foot-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fs-foot-links__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.45;
}

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

form.grid label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

form.grid input,
form.grid select {
  width: 100%;
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--elevated);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

form.grid input:focus-visible,
form.grid select:focus-visible {
  outline: none;
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

form.grid .full {
  grid-column: 1 / -1;
}

@media (min-width: 560px) {
  .fs-model--crop form.grid,
  .fs-model--fert form.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

form.stack .full {
  width: 100%;
}

button[type="submit"],
button.btn {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 9px;
  background: linear-gradient(180deg, #14b8a6 0%, var(--accent-dim) 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
button[type="submit"]:hover,
button.btn:hover {
  filter: brightness(1.08);
}

button[type="submit"]:focus-visible,
button.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#result {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

#result.ok {
  color: var(--text);
  border-color: rgba(94, 234, 212, 0.25);
}

#result.err {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
}

.history-wrap {
  margin: 0 auto 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--elevated);
}

.history-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.history-table th,
.history-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.history-table th {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: left;
  background: var(--panel);
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table__mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.history-table__farm {
  color: var(--text);
  font-weight: 500;
}

.history-table__summary {
  color: var(--text);
  word-break: break-word;
  max-width: min(24rem, 40vw);
}

.history-table__num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.history-risk {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.history-risk--low {
  color: #6ee7b7;
  background: rgba(110, 231, 183, 0.12);
}

.history-risk--medium {
  color: #fcd34d;
  background: rgba(252, 211, 77, 0.12);
}

.history-risk--high {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
}

.history-empty {
  margin: 0;
  width: 100%;
  max-width: none;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--elevated);
  border: 1px dashed var(--border);
  border-radius: var(--fs-radius);
}

.history-foot {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.65rem;
  font-size: 0.9rem;
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.site-footer-inner {
  width: var(--locked-width);
  margin: 0 auto;
  padding: 1.05rem var(--nav-pad-x);
  text-align: center;
}

.site-footer a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 520px) {
  form.grid {
    grid-template-columns: 1fr;
  }
}

form.stack label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

form.stack input[type="file"] {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}
