:root {
  color-scheme: light;
  --bg: #eef2f1;
  --ink: #17211f;
  --muted: #53615e;
  --panel: #ffffff;
  --line: #cbd8d4;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warm: #9a3412;
  --soft: #e5f4f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(15, 118, 110, 0.11), transparent 34rem),
    linear-gradient(245deg, rgba(154, 52, 18, 0.10), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration-thickness: 2px;
}

.app {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.panel,
.privacy,
.examples {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-panel {
  padding: clamp(20px, 4vw, 40px);
  box-shadow: 0 24px 80px rgba(23, 33, 31, 0.10);
}

.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lede {
  max-width: 68ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.date-badge {
  min-height: 150px;
  border: 1px solid #9fd4cb;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--soft), #ffffff);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
}

.date-badge span {
  display: block;
  color: var(--accent-dark);
  font-size: 3rem;
  font-weight: 900;
}

.date-badge small {
  color: var(--muted);
  font-weight: 800;
}

.calculator {
  margin-top: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  background: #ffffff;
}

input,
select {
  min-height: 50px;
  padding: 10px 12px;
}

textarea {
  min-height: 280px;
  margin-top: 16px;
  padding: 14px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  font-weight: 500;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.result-band {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #9fd4cb;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
}

.result-band > div {
  min-height: 118px;
  padding: 18px;
}

.result-band > div + div {
  border-left: 1px solid #9fd4cb;
}

.result-band strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.15rem, 3vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.result-band small,
.result-band span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.result-band .error {
  grid-column: 1 / -1;
  color: #991b1b;
  background: #fff1f2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

button:nth-child(n+3) {
  background: var(--ink);
}

button:focus {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

.rate-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.support {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.source-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-strip span {
  color: var(--muted);
  font-weight: 850;
  margin-right: 4px;
}

.source-strip a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  text-decoration: none;
  background: #f8fbfa;
}

.examples,
.privacy {
  padding: 18px;
}

.privacy p {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 650;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  font-weight: 650;
}

@media (max-width: 780px) {
  .app {
    width: min(100% - 20px, 1160px);
    padding: 10px 0;
  }

  .mast,
  .grid,
  .support {
    grid-template-columns: 1fr;
  }

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

  .result-band > div + div {
    border-left: 0;
    border-top: 1px solid #9fd4cb;
  }

  h1 {
    font-size: 2.25rem;
  }
}
