:root {
  --bg: #23261f;
  --bg-soft: #31372d;
  --paper: #f4e8d2;
  --paper-deep: #ddc7a0;
  --card: #2b3027;
  --card-raised: #394034;
  --card-light: #f0e4cf;
  --text: #fff8ef;
  --text-dark: #26261f;
  --muted: #d6ceb8;
  --muted-dark: #5a5648;
  --accent: #a7b58d;
  --accent-strong: #87966f;
  --teal: #b8c4a1;
  --border: rgba(255, 248, 239, 0.22);
  --border-strong: rgba(255, 248, 239, 0.34);
  --shadow: 0 24px 60px rgba(17, 20, 14, 0.42);
}

body.theme-day {
  --bg: #eaf1e4;
  --bg-soft: #ffffff;
  --paper: #242b1f;
  --paper-deep: #1b2207;
  --card: #ffffff;
  --card-raised: #f6f8f4;
  --card-light: #ffffff;
  --text: #1b2116;
  --text-dark: #1b2116;
  --muted: #475046;
  --muted-dark: #7d846d;
  --accent: #6d8b54;
  --accent-strong: #4b6b2b;
  --teal: #a9b98c;
  --border: rgba(27, 33, 22, 0.12);
  --border-strong: rgba(27, 33, 22, 0.32);
  --shadow: 0 24px 60px rgba(17, 20, 14, 0.24);
  background:
    radial-gradient(circle at top left, rgba(109, 139, 84, 0.24), transparent 30%),
    linear-gradient(180deg, #f8f7f1 0%, #f1f3ed 26%, #edf0e6 60%, #e2e6d6 100%);
}

body.theme-night {
  --bg: #0d0f0a;
  --bg-soft: #191d16;
  --paper: #f4edce;
  --paper-deep: #d6c69a;
  --card: #11130c;
  --card-raised: #1b2014;
  --card-light: #1c1f18;
  --text: #fefefe;
  --text-dark: #dad6cf;
  --muted: #9fa385;
  --muted-dark: #787d6e;
  --accent: #d08a5a;
  --accent-strong: #bc6c37;
  --teal: #a1c3ab;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.2);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.8);
  background:
    radial-gradient(circle at top right, rgba(208, 138, 90, 0.2), transparent 40%),
    linear-gradient(180deg, #080a06 0%, #0d1008 40%, #11150a 80%, #090a05 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", "Franklin Gothic Medium", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(167, 181, 141, 0.24), transparent 30%),
    linear-gradient(180deg, #21241d 0%, #2b3027 26%, #373d31 60%, #252921 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(76px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
}

.background-glow-left {
  top: -8rem;
  left: -8rem;
  background: var(--accent);
}

.background-glow-right {
  top: 18rem;
  right: -10rem;
  background: #d0c0a5;
}

.hero,
.section {
  position: relative;
  z-index: 1;
}

.section {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.hero {
  padding: 1.5rem clamp(1.25rem, 4vw, 4rem) 4rem;
}

.topbar,
.hero-grid,
.section,
.reference-grid,
.tool-grid,
.board-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge,
.status-pill,
.card-tag,
.chip {
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #160d05;
  padding: 0.45rem 0.7rem;
  font-weight: 700;
}

.brand-name {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.top-link {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

.top-link:hover {
  color: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: stretch;
}

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

.hero-stack {
  display: grid;
  gap: 1.25rem;
}

.hero-poster,
.graphic-card,
.hero-float {
  margin: 0;
  overflow: hidden;
  border-radius: 1.6rem;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, #404738 0%, #2a2f27 100%);
}

.hero-poster img,
.graphic-card img,
.hero-float img,
.warning-graphic {
  display: block;
  width: 100%;
  height: auto;
}

.hero-floats {
  position: relative;
  min-height: 16rem;
  margin-top: -2rem;
}

.hero-float {
  position: absolute;
  width: 48%;
}

.hero-float-warning {
  left: -2%;
  top: 1.2rem;
  transform: rotate(-5deg);
  z-index: 2;
}

.hero-float-hype {
  right: -2%;
  top: 4.2rem;
  transform: rotate(4deg);
  z-index: 1;
}

.hero-poster figcaption {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.2rem;
}

.hero-poster figcaption strong {
  font-size: 1.2rem;
}

.hero-poster figcaption span:last-child {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--paper-deep);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(3.8rem, 9vw, 7rem);
  line-height: 0.95;
  max-width: 10ch;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.98;
  max-width: 16ch;
}

h3 {
  font-size: 1.35rem;
}

.hero-text,
.card p,
.result,
.small-note,
textarea,
table,
label,
.advice-list,
.status-list,
.task-list {
  line-height: 1.55;
}

.hero-text {
  max-width: 60ch;
  color: var(--paper);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.search-shell {
  margin: 1.25rem 0 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1.35rem;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(255, 248, 239, 0.08) 0%, rgba(255, 248, 239, 0.04) 100%);
  box-shadow: 0 18px 36px rgba(17, 20, 14, 0.24);
}

.search-shell-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.search-form {
  display: grid;
  gap: 0.8rem;
}

.search-label {
  font-size: 0.95rem;
  color: var(--paper);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  color: var(--paper);
}

.search-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent-strong);
}

.search-status {
  margin-bottom: 0;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quick-links a {
  color: var(--paper);
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  font-weight: 700;
}

.quick-links a:hover {
  color: #180f09;
  background: var(--accent);
}

.hero-pill {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-pill:hover,
.hero-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #202219;
  box-shadow: 0 18px 30px rgba(135, 150, 111, 0.3);
}

.button-secondary {
  background: #444a3c;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.button-full {
  width: 100%;
}

.compact-actions {
  margin-top: 1rem;
}

.snark-line {
  color: var(--paper-deep);
  font-size: 1rem;
  font-weight: 500;
}

.hero-card,
.card {
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.hero-card {
  background: linear-gradient(180deg, #404738 0%, #2a2f27 100%);
  border-radius: 1.6rem;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-card-header,
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.status-pill,
.card-tag {
  background: rgba(108, 235, 211, 0.16);
  color: var(--teal);
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(108, 235, 211, 0.4);
}

.status-list,
.advice-list,
.task-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.status-list li,
.advice-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.status-list li span,
.card p {
  color: var(--muted);
}

.status-list strong {
  display: block;
  color: var(--text);
}

.section {
  padding: 3rem clamp(1.25rem, 4vw, 4rem);
}

.section-dark {
  color: var(--text);
}

.section-light {
  background: linear-gradient(180deg, #e6dcc7 0%, #f1e6d4 100%);
  color: var(--text-dark);
  border-top: 1px solid rgba(17, 22, 27, 0.08);
  border-bottom: 1px solid rgba(17, 22, 27, 0.08);
}

.section-light .section-heading .eyebrow,
.section-light h2 {
  color: var(--text-dark);
}

.section-heading {
  margin-bottom: 2rem;
}

.tool-grid,
.board-grid,
.reference-grid {
  display: grid;
  gap: 1.5rem;
}

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

.board-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

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

.estimate-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  width: min(1280px, 100%);
  margin: 0 auto;
}

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

.estimate-review {
  display: grid;
  gap: 1rem;
}

.estimate-review p {
  margin: 0;
}

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

.estimate-metric {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(17, 22, 27, 0.08);
  border: 1px solid rgba(17, 22, 27, 0.12);
}

.estimate-metric strong,
.estimate-line strong,
.estimate-note strong {
  display: block;
  margin-bottom: 0.3rem;
}

.estimate-breakdown,
.estimate-notes {
  display: grid;
  gap: 0.7rem;
}

.estimate-line,
.estimate-note {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(17, 22, 27, 0.06);
  border: 1px solid rgba(17, 22, 27, 0.1);
}

.estimate-line span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 700;
}

.news-result a {
  color: var(--accent);
  text-decoration: underline;
  display: inline-block;
  margin-top: 0.2rem;
}

.hidden-module {
  display: none !important;
}

.user-registration-result {
  display: grid;
  gap: 0.6rem;
}

.theme-toggle {
  justify-content: space-between;
}

.theme-toggle .button {
  flex: 1;
}

.theme-toggle .button + .button {
  margin-left: 0.5rem;
}

.theme-toggle .button.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #202219;
}

.schedule-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.schedule-head,
.schedule-row {
  display: grid;
  grid-template-columns: 5rem 1fr 2fr 7rem;
  gap: 0.75rem;
  align-items: center;
}

.schedule-head {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-dark);
  font-weight: 700;
}

.schedule-row {
  padding: 0.85rem;
  border-radius: 1rem;
  background: rgba(17, 22, 27, 0.06);
  border: 1px solid rgba(17, 22, 27, 0.1);
}

.schedule-row span {
  font-weight: 700;
  color: var(--text-dark);
}

.card {
  background: linear-gradient(180deg, var(--card-raised) 0%, var(--card) 100%);
  border-radius: 1.5rem;
  padding: 1.4rem;
  contain: layout paint;
}

.card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.favorite-button {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.08);
  color: var(--paper);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.favorite-button:hover,
.favorite-button:focus-visible {
  transform: translateY(-1px);
}

.favorite-button.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
  color: #202219;
}

.card.is-favorite {
  box-shadow: 0 0 0 1px rgba(167, 181, 141, 0.35), var(--shadow);
}

.card.search-hidden,
.section.search-hidden {
  display: none !important;
}

.warning-graphic-card {
  padding: 0;
  overflow: hidden;
}

.warning-graphic {
  min-height: 100%;
  object-fit: cover;
}

.card-light {
  background: var(--card-light);
  border: 1px solid rgba(17, 22, 27, 0.14);
}

.card-light .card-tag {
  background: rgba(17, 22, 27, 0.08);
  color: var(--text-dark);
  border: 1px solid rgba(17, 22, 27, 0.12);
}

.stack {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.panel-toolbar {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.panel-toggle-group {
  margin-bottom: 0;
}

.toggle-chip {
  border: 1px solid var(--border-strong);
  background: rgba(255, 248, 239, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toggle-chip.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #202219;
  border-color: transparent;
}

.card-light .toggle-chip {
  background: rgba(17, 22, 27, 0.04);
  color: var(--text-dark);
  border-color: rgba(17, 22, 27, 0.18);
}

.card-light .toggle-chip.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #202219;
  border-color: transparent;
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.card-light label {
  color: var(--text-dark);
}

input,
select,
textarea {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid var(--border-strong);
  background: #20241d;
  color: var(--text);
  padding: 0.9rem 1rem;
  font: inherit;
}

.card-light input,
.card-light select,
.card-light textarea {
  border-color: rgba(17, 22, 27, 0.22);
  background: #ffffff;
  color: var(--text-dark);
}

input::placeholder,
textarea::placeholder {
  color: #aab5c2;
}

.card-light input::placeholder,
.card-light textarea::placeholder {
  color: #667382;
}

input:focus,
select:focus,
textarea:focus,
.button:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.result {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: #20241d;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.card-light .result {
  background: #fff;
  color: var(--text-dark);
  border: 1px solid rgba(17, 22, 27, 0.14);
}

.task-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  margin-top: 1rem;
}

.task-list {
  display: grid;
  gap: 0.75rem;
}

.task-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(17, 22, 27, 0.08);
  border: 1px solid rgba(17, 22, 27, 0.12);
}

.task-item.done span {
  text-decoration: line-through;
  opacity: 0.65;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
}

.icon-button {
  min-width: 2.5rem;
  height: 2.3rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 22, 27, 0.16);
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.favorites-list {
  display: grid;
  gap: 0.8rem;
}

.favorite-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(17, 22, 27, 0.14);
  background: rgba(17, 22, 27, 0.05);
  color: var(--text-dark);
  text-decoration: none;
}

.favorite-link strong,
.favorite-link span {
  display: block;
}

.favorite-link span {
  color: var(--muted-dark);
  font-size: 0.9rem;
}

.preference-summary {
  display: grid;
  gap: 0.75rem;
}

.preference-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.preference-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(17, 22, 27, 0.08);
  border: 1px solid rgba(17, 22, 27, 0.14);
  font-weight: 700;
}

.color-system-title {
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--paper);
}

.color-system-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.color-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  background: #171a15;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.04);
  letter-spacing: 0.01em;
}

.color-system-note {
  margin-top: 0.9rem;
  color: var(--muted);
}

.phase-black {
  color: #ffffff;
  border-color: #5f5f5f;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(255, 255, 255, 0.08);
}

.phase-red {
  color: #ff6b6b;
  border-color: #c62828;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(198, 40, 40, 0.32);
}

.phase-blue {
  color: #6fb5ff;
  border-color: #1565c0;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(21, 101, 192, 0.34);
}

.phase-brown {
  color: #c98f72;
  border-color: #8d6e63;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(141, 110, 99, 0.3);
}

.phase-orange {
  color: #ff9a3d;
  border-color: #ef6c00;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(239, 108, 0, 0.34);
}

.phase-yellow {
  color: #ffd34d;
  border-color: #f9a825;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(249, 168, 37, 0.32);
}

.phase-white {
  color: #fffdf7;
  border-color: #d7d7d7;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(255, 255, 255, 0.18);
}

.phase-gray {
  color: #c8c8c8;
  border-color: #8d8d8d;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(141, 141, 141, 0.24);
}

.phase-green {
  color: #59d86a;
  border-color: #2e7d32;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 0 16px rgba(46, 125, 50, 0.34);
}

.chip {
  background: rgba(17, 22, 27, 0.08);
  color: var(--text-dark);
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(17, 22, 27, 0.12);
}

.small-note {
  margin-top: 0.75rem;
  color: var(--muted-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th,
td {
  text-align: left;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

th {
  color: var(--paper-deep);
}

td {
  color: var(--text);
}

.advice-list li {
  color: var(--text);
}

body.lite-mode {
  background: linear-gradient(180deg, #21241d 0%, #2b3027 55%, #252921 100%);
}

body.lite-mode .background-glow,
body.lite-mode .hero-floats,
body.lite-mode .warning-graphic-card {
  display: none;
}

body.lite-mode .hero-poster,
body.lite-mode .graphic-card,
body.lite-mode .hero-card,
body.lite-mode .card {
  box-shadow: 0 10px 22px rgba(17, 20, 14, 0.18);
}

body.lite-mode .section-light {
  background: #eee1cb;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .background-glow,
  .hero-floats {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .tool-grid,
  .board-grid,
  .reference-grid,
  .estimate-layout,
  .estimate-field-grid,
  .estimate-metrics {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1rem;
  }

  .hero-floats {
    min-height: 0;
    margin-top: 0;
    display: grid;
    gap: 1rem;
  }

  .hero-float {
    position: static;
    width: 100%;
    transform: none;
  }

  .schedule-head,
  .schedule-row {
    grid-template-columns: 4rem 1fr 1fr 6rem;
  }

  .hero-stack {
    order: -1;
  }

  .hero-card {
    margin-top: 0;
  }

  .hero-pill {
    margin-left: 0;
    align-self: flex-start;
  }

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

  .background-glow {
    display: none;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 3.6rem;
  }

  .topbar,
  .hero-actions,
  .task-form {
    flex-direction: column;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .top-link {
    align-self: flex-start;
  }

  .quick-links {
    flex-direction: column;
    align-items: stretch;
  }

  .search-shell-header,
  .favorite-link {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-head {
    display: none;
  }

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