:root {
  --bg: #f4efe4;
  --panel: rgba(255, 252, 247, 0.84);
  --panel-strong: #fffaf0;
  --ink: #1d1b19;
  --muted: #6b6259;
  --accent: #0f766e;
  --accent-strong: #0a5e58;
  --accent-soft: #dff2ef;
  --border: rgba(29, 27, 25, 0.1);
  --shadow: 0 18px 60px rgba(70, 52, 33, 0.12);
  --radius: 24px;
  --radius-small: 16px;
  --content: 1180px;
  --title-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(199, 124, 48, 0.15), transparent 24%),
    linear-gradient(180deg, #fbf6eb 0%, #f2eadb 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.site-header,
.site-footer,
.tool-card,
.hero-panel,
.service-card,
.info-panel,
.metric-card,
.operation-card,
.legal-content {
  backdrop-filter: blur(12px);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.site-header.compact {
  margin-bottom: 1.5rem;
}

.brand {
  font-family: var(--title-font);
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-tag {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 42rem;
}

.site-nav,
.footer-links,
.hero-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.site-nav a,
.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:hover,
.footer-links a:hover,
.text-link:hover,
.text-button:hover {
  color: var(--accent-strong);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin: 1.5rem 0 2rem;
}

.hero-copy,
.tool-hero {
  padding: 2.2rem 0.25rem 0.25rem;
}

.hero h1,
.tool-hero h1,
.section-heading h2,
.legal-content h1,
.legal-content h2 {
  font-family: var(--title-font);
}

.hero h1,
.tool-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0.25rem 0 1rem;
  max-width: 12ch;
}

.hero-text,
.tool-hero p,
.legal-content p {
  font-size: 1.03rem;
  line-height: 1.7;
  color: #3f3a34;
}

.hero-panel,
.tool-card,
.service-card,
.info-panel,
.metric-card,
.operation-card,
.legal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.metric-card,
.info-panel {
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,248,239,0.92));
}

.metric-label,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 700;
}

.button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

.button:hover,
.file-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary,
.file-button {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}

.file-button input {
  display: none;
}

.section {
  margin: 2.5rem 0;
}

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

.section-heading.small {
  margin-bottom: 1rem;
}

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

.service-card {
  padding: 1.5rem;
}

.service-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.service-card h3,
.info-panel h3,
.metric-card strong {
  margin-bottom: 0.5rem;
}

.split-section {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: start;
}

.panel-stack {
  display: grid;
  gap: 1rem;
}

.text-link,
.text-button {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.tool-layout {
  display: grid;
  gap: 1.2rem;
}

.tool-card {
  padding: 1.25rem;
}

.form-grid,
.operation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field input,
.field select,
.letter-draft {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(29, 27, 25, 0.14);
  background: rgba(255, 255, 255, 0.82);
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.letter-draft:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.status-line,
.micro-copy {
  color: var(--muted);
  line-height: 1.6;
}

.operations-list {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.operation-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

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

.operation-title {
  font-size: 1rem;
}

.operation-meta {
  margin: 0.85rem 0 0;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid rgba(29, 27, 25, 0.09);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 700;
}

.data-table tbody tr.highlight-row {
  background: var(--accent-soft);
}

.letter-draft {
  resize: vertical;
  min-height: 16rem;
}

.legal-shell {
  padding-top: 1rem;
}

.legal-content {
  padding: 2rem;
  margin-top: 1.5rem;
}

.legal-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-top: 0.25rem;
}

.legal-content h2 {
  margin-top: 2rem;
}

@media (max-width: 980px) {
  .hero,
  .split-section,
  .service-grid,
  .form-grid,
  .operation-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--content));
  }

  .hero h1,
  .tool-hero h1 {
    max-width: none;
  }

  .tool-card,
  .service-card,
  .legal-content {
    padding: 1rem;
  }
}
