 :root {
  --field-900: #0b3f27;
  --field-800: #115a37;
  --field-700: #1a7a4b;
  --field-100: #eaf6ef;
  --field-050: #f5fbf8;

  --surface: #ffffff;
  --surface-alt: #f6fbf8;
  --ink: #12261a;
  --ink-soft: #3d5a4a;
  --line: #c8ddce;
  --line-strong: #91b79e;

  --gold-500: #f0b429;
  --gold-600: #d79a12;
  --good-500: #1c9f5f;
  --warn-500: #c58a10;
  --bad-500: #8b5e6e;
  --danger-500: #b53939;

  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;

  --shadow-soft: 0 12px 28px rgba(11, 42, 27, 0.1);
  --shadow-strong: 0 20px 44px rgba(11, 42, 27, 0.16);

  --sans: "Inter", "Trebuchet MS", "Lucida Sans Unicode", "Tahoma", sans-serif;
  --font-heading: "Franklin Gothic Demi", "Trebuchet MS", "Verdana", sans-serif;
  --font-body: var(--sans);
  --font-mono: "Consolas", "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--field-050);
  line-height: 1.45;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  z-index: -2;
  background: linear-gradient(130deg, var(--field-900) 0%, var(--field-700) 58%, #21925b 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 2px, transparent 2px 58px),
    linear-gradient(180deg, rgba(18, 85, 53, 0.22) 0 280px, transparent 280px);
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.35rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem clamp(0.9rem, 2vw, 1.5rem);
  border-bottom: 2px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(130deg, rgba(8, 38, 24, 0.95), rgba(18, 95, 58, 0.93));
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand__name {
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

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

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav a {
  color: #f2fff7;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
}

.nav a:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
}

.nav .btn {
  width: auto;
  padding: 0.38rem 0.7rem;
  font-size: 0.8rem;
  color: #f2fff7;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.nav .btn:hover {
  background: rgba(255, 255, 255, 0.21);
}

.wrap {
  width: min(1240px, calc(100% - 2rem));
  margin: 1.1rem auto 2.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
  animation: rise-in 0.45s ease both;
}

.hero__panel {
  border-radius: var(--radius-xl);
  padding: 1.1rem;
  color: #f7fffb;
  background: linear-gradient(150deg, rgba(11, 45, 28, 0.86), rgba(18, 98, 60, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: var(--shadow-soft);
}

.hero__title {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  font-size: clamp(1.28rem, 1.8vw, 1.65rem);
  line-height: 1.2;
}

.hero__lead {
  margin-top: 0.5rem;
  color: rgba(247, 255, 251, 0.9);
}

.hero__tags {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.heroTag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.24rem 0.56rem;
}

.hero__stats {
  border-radius: var(--radius-xl);
  padding: 1rem;
  background: linear-gradient(170deg, #fff4d1, #ffe39a);
  border: 1px solid #e8cb83;
  box-shadow: var(--shadow-soft);
}

.hero__stats h2 {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  margin-bottom: 0.55rem;
  color: #5a3f01;
}

.heroMetricGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.52rem;
}

.heroMetric {
  border: 1px solid rgba(131, 91, 5, 0.25);
  background: rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-md);
  padding: 0.54rem;
}

.heroMetric__k {
  font-family: var(--sans);
  color: #7a5a0e;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.heroMetric__v {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  animation: rise-in 0.5s ease both;
}

.todayStrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8fcf9, #edf6f0);
  padding: 0.48rem;
}

.todayItem {
  border: 1px solid #d7e8dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.32rem 0.42rem;
}

.todayItem__k {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #567461;
  font-family: var(--font-heading);
}

.todayItem__v {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.88rem;
  color: #163524;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.pageHero {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-xl);
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  color: #f7fffb;
  background: linear-gradient(120deg, rgba(10, 43, 27, 0.84), rgba(15, 86, 54, 0.78));
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: rgba(247, 255, 251, 0.82);
}

.pageTitle {
  font-family: var(--font-heading);
  font-size: clamp(1.28rem, 1.7vw, 1.65rem);
  margin-top: 0.28rem;
}

.pageLead {
  margin-top: 0.45rem;
  color: rgba(247, 255, 251, 0.9);
}

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

.sectionCard {
  padding: 1rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-alt));
}

.sectionTitle {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #143822;
}

.sectionText {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.sectionText + .sectionTitle,
.sectionText + .callout,
ul + .sectionTitle,
ol + .sectionTitle {
  margin-top: 0.8rem;
}

.callout {
  margin-top: 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid #d9c17c;
  background: #fff4d6;
  color: #614500;
  font-size: 0.9rem;
  padding: 0.56rem 0.65rem;
}

.label {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2d513e;
}

.muted {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.topbar .muted {
  color: rgba(242, 255, 247, 0.83);
}

.h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.inputRow {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 0.9rem;
  align-items: end;
}

.inputCol {
  position: relative;
}

.actionsCol {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.actionsCol .btn {
  flex: 1 1 0;
  min-width: 112px;
}

.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0.72rem 0.82rem;
  font-size: 1rem;
  font-family: var(--sans);
  color: #102417;
  background: #fdfefc;
  outline: none;
}

.input:focus {
  border-color: #57996f;
  box-shadow: 0 0 0 3px rgba(83, 159, 110, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a47209;
  border-radius: var(--radius-md);
  padding: 0.67rem 0.74rem;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  color: #2d1f00;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

#submitGuessBtn,
#clearBtn,
#copyShareBtn,
#copyCompareBtn {
  font-family: var(--sans);
}

.btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn--ghost {
  color: #1b4b30;
  background: linear-gradient(180deg, #ecf8f0, #dceddf);
  border-color: #92ba9f;
}

.nav .btn.btn--ghost {
  color: #f2fff7;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.error {
  min-height: 1.25rem;
  margin-top: 0.32rem;
  color: var(--danger-500);
  font-size: 0.9rem;
  font-weight: 700;
}

.endStateMessage {
  margin-top: 0.32rem;
  border: 1px solid #d8e8de;
  border-radius: var(--radius-md);
  background: #f5faf7;
  color: #1c4b31;
  padding: 0.44rem 0.56rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.todaysPlayer {
  margin-top: 0.7rem;
  border: 1px solid #d8e8de;
  border-radius: var(--radius-lg);
  background: #f6faf8;
  padding: 0.55rem 0.6rem 0.6rem;
}

.todaysPlayer__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.todaysPlayer__title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--font-heading);
  color: #2f5741;
}

.todaysPlayer__subtitle {
  font-size: 0.78rem;
  color: #4f6c5c;
}

.todaysPlayer__tableWrap {
  margin-top: 0.35rem;
}

.ac {
  margin-top: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: none;
  max-height: 240px;
  overflow-y: auto;
}

.ac__item {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  border-bottom: 1px solid #ebf3ee;
  padding: 0.58rem 0.7rem;
  cursor: pointer;
}

.ac__item:last-child {
  border-bottom: 0;
}

.ac__item:hover,
.ac__item[aria-selected="true"] {
  background: #e7f4eb;
}

.ac__item--active {
  background: #e7f4eb;
}

.ac__meta {
  color: #5d7d6a;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.tableWrap {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: auto;
}

.resultsHead {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.resultsHead__title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--font-heading);
  color: #2f5741;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 940px;
  background: #ffffff;
}

.th {
  position: sticky;
  top: 0;
  background: #edf6ef;
  color: #305740;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.58rem 0.62rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.th--name {
  min-width: 220px;
}

td {
  border-bottom: 1px solid #eef5f0;
  padding: 0.57rem 0.62rem;
  vertical-align: top;
}

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

.empty {
  text-align: center;
  padding: 1rem 0.7rem;
  color: #547161;
}

.cellName {
  font-weight: 700;
}

.cellSub {
  margin-top: 0.24rem;
  font-size: 0.76rem;
  color: #597967;
  font-family: var(--font-mono);
}

.tile {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 0.45rem 0.48rem;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  justify-content: center;
}

.tile__mark {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #2f4a3a;
}

.tile__val {
  font-size: 0.82rem;
  color: #163423;
  line-height: 1.22;
  font-variant-numeric: tabular-nums;
}

.tile--g {
  border-color: #86d3ab;
  background: #e6f8ee;
}

.tile--y {
  border-color: #e9cb79;
  background: #fff6de;
}

.tile--x {
  border-color: #cfbac2;
  background: #f8f1f4;
}

.footnote {
  margin-top: 0.75rem;
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #476553;
  font-size: 0.85rem;
}

.legend--compact {
  font-size: 0.76rem;
  gap: 0.35rem;
}

.legend--compact .pill {
  padding: 0.14rem 0.42rem;
  font-size: 0.68rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.pill--g {
  border-color: #76c99f;
  background: #e6f8ee;
}

.pill--y {
  border-color: #d8b95f;
  background: #fff6de;
}

.pill--x {
  border-color: #cfbac2;
  background: #f8f1f4;
}

.pill--plain {
  border-color: #adc5b4;
  background: #edf7f1;
}

.emptySilhouetteRow td {
  padding-top: 0.45rem;
  padding-bottom: 0.58rem;
}

.emptySilhouette {
  height: 10px;
  width: 74%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef5f0, #e2ede6);
}

.emptySilhouette--long {
  width: 86%;
}

.cellEnter {
  transform-origin: 50% 20%;
  animation: tile-enter 220ms ease both;
  animation-delay: var(--enter-delay, 0ms);
}

.footer {
  margin-top: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.14rem 0.2rem;
}

.footerFeedback a {
  color: #1f5b39;
  border-bottom: 1px dotted #7ea891;
}

.footerFeedback a:hover {
  border-bottom-style: solid;
}

.links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.links a {
  color: #1f5b39;
  font-weight: 700;
  font-size: 0.88rem;
  border-bottom: 1px dotted #7ea891;
}

.links a:hover {
  border-bottom-style: solid;
}

.dialog {
  width: min(720px, calc(100% - 1.2rem));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 0.95rem;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-strong);
}

.dialog::backdrop {
  background: rgba(4, 24, 15, 0.5);
}

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

.updatesLog {
  margin-top: 0.8rem;
}

.updateEntry {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  padding: 0.6rem 0.68rem;
}

.updateEntry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.updateEntry__version {
  font-family: var(--font-heading);
  color: #1e4f33;
}

.updateEntry__meta {
  font-size: 0.84rem;
  color: #4b6a59;
}

.updateEntry__items {
  margin-top: 0.45rem;
  color: #2b4e3b;
}

.grid {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.stat {
  border: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.6rem;
}

.stat__k {
  font-size: 0.75rem;
  color: #567264;
  text-transform: uppercase;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.stat__v {
  margin-top: 0.14rem;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
}

.shareBox {
  margin-top: 0.8rem;
}

.textarea {
  width: 100%;
  margin-top: 0.28rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 0.64rem 0.72rem;
  min-height: 132px;
  font-family: var(--font-mono);
  color: #163624;
  background: #fdfefc;
  resize: vertical;
}

#shareText {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: pre;
  tab-size: 16;
}

.shareActions {
  margin-top: 0.42rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#copyStatus,
#copyCompareStatus {
  margin-top: 0.28rem;
}

.compareCard {
  margin-bottom: 0.95rem;
}

.compareCard__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.compareBody {
  margin-top: 0.6rem;
}

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

.compareColumns--single {
  grid-template-columns: 1fr;
}

.compareCol {
  border: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 0.58rem;
}

.compareCol__title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2d513e;
}

.compareCol__meta {
  margin-top: 0.18rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #4d6b5b;
}

.compareRows {
  margin-top: 0.42rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.compareRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
}

.compareToken {
  min-width: 2.1ch;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0.17rem 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #163423;
  background: #ffffff;
}

.compareToken--g {
  border-color: #86d3ab;
  background: #e6f8ee;
}

.compareToken--y {
  border-color: #e9cb79;
  background: #fff6de;
}

.compareToken--x {
  border-color: #cfbac2;
  background: #f8f1f4;
}

.compareEmpty {
  color: #547161;
  font-size: 0.85rem;
}

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

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes tile-enter {
  from {
    opacity: 0;
    transform: rotateX(-8deg) translateY(6px);
  }

  to {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .card,
  .cellEnter {
    animation: none !important;
  }
}

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

  .inputRow {
    grid-template-columns: 1fr;
  }

  .actionsCol {
    justify-content: flex-start;
  }

  .contentColumns {
    grid-template-columns: 1fr;
  }

  .todayStrip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .wrap {
    width: calc(100% - 1.1rem);
    margin-top: 0.8rem;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .heroMetricGrid {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .compareColumns {
    grid-template-columns: 1fr;
  }

}
