:root {
  --bg: #f6f0e3;
  --bg-soft: #fbf8f0;
  --surface: #fffdf8;
  --surface-strong: #efe4cf;
  --line: #d8c8ab;
  --text: #2e2419;
  --muted: #655743;
  --accent: #2b5561;
  --accent-soft: #dbe7ea;
  --warn: #7f5e34;
  --shadow: 0 18px 44px rgba(45, 34, 22, 0.08);
  --radius: 14px;
  --wrap: min(1080px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8f3e8 0%, #f4eddf 100%);
  line-height: 1.55;
}

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

.wrap {
  width: var(--wrap);
  margin: 0 auto;
}

.top-strip {
  background: #2f261f;
  color: #f5ebd8;
  font-size: 13px;
}

.top-strip-inner,
.header-inner,
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-strip-inner {
  min-height: 38px;
}

.site-header {
  border-bottom: 1px solid rgba(122, 95, 57, 0.15);
  background: rgba(251, 248, 240, 0.92);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: 72px;
  flex-wrap: wrap;
}

.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-nav a,
.footer-links a,
.inline-link {
  font-size: 15px;
  color: var(--accent);
}

.site-main {
  padding: 32px 0 72px;
}

.hero-block,
.tool-card,
.content-card,
.table-section,
.faq-section,
.related-section {
  margin-bottom: 28px;
}

.hero-block {
  padding: 18px 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--warn);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
  max-width: 10ch;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
}

h3 {
  font-size: 18px;
}

.lede,
.tool-card-heading p,
.section-heading p,
.content-card p,
.small-note,
.related-card span,
.faq-list p,
.panel p,
.helper-text {
  color: var(--muted);
}

.lede {
  max-width: 760px;
  margin-top: 14px;
  font-size: 18px;
}

.tool-card,
.content-card,
.table-section,
.faq-section,
.related-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-card,
.table-section,
.faq-section,
.related-section {
  padding: 28px;
}

.content-card {
  padding: 24px;
}

.tool-card-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.converter-grid,
.info-grid,
.related-grid {
  display: grid;
  gap: 20px;
}

.converter-grid {
  grid-template-columns: minmax(300px, 1.05fr) minmax(260px, 0.95fr);
}

.info-grid {
  grid-template-columns: 1.25fr 0.75fr;
}

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

.panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.panel-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.field span {
  font-weight: 700;
}

input,
select,
.value-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cdb997;
  border-radius: 10px;
  background: #fffdfa;
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(43, 85, 97, 0.14);
  border-color: var(--accent);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

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

.button-secondary {
  background: #fff;
  color: var(--accent);
  border-color: #c8b089;
}

.helper-text {
  margin: 0;
  font-size: 13px;
}

.result-intro strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.result-intro p:last-child {
  margin: 10px 0 0;
}

.result-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffdfa;
  border: 1px solid #e3d4bc;
}

.result-row strong {
  font-size: 18px;
}

.note-card {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}

.step-list,
.bullet-list {
  padding-left: 20px;
  margin: 16px 0 0;
}

.step-list li,
.bullet-list li {
  margin-bottom: 10px;
}

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

.size-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.size-table th,
.size-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #e9dcc6;
}

.size-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--warn);
}

.size-table tbody tr:nth-child(even) {
  background: #fcf8f0;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border: 1px solid #e0d1b8;
  border-radius: 12px;
  padding: 16px 18px;
  background: #fffcf6;
}

.faq-list summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-list p {
  margin-bottom: 0;
}

.related-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 20px;
  border: 1px solid #ddccb0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf9 0%, #f8f1e4 100%);
}

.related-card strong {
  font-size: 20px;
}

.site-footer {
  border-top: 1px solid rgba(122, 95, 57, 0.2);
  background: #f2e8d7;
  padding: 24px 0 36px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.page-article {
  padding: 34px 0 70px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.article-card + .article-card {
  margin-top: 22px;
}

.article-card ul,
.article-card ol {
  padding-left: 20px;
}

.article-card li {
  margin-bottom: 10px;
}

.mini-tool {
  display: grid;
  gap: 16px;
}

.mini-tool .actions {
  margin-top: 2px;
}

.mini-result {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #dfcfb5;
  background: #fffdf9;
}

.mini-result strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}

@media (max-width: 980px) {
  .converter-grid,
  .info-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .tool-card-heading,
  .section-heading,
  .header-inner,
  .top-strip-inner,
  .footer-grid {
    align-items: start;
  }

  .tool-card-heading,
  .section-heading {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-main {
    padding-top: 22px;
  }

  .tool-card,
  .table-section,
  .faq-section,
  .related-section,
  .article-card {
    padding: 20px;
  }

  .brand {
    font-size: 24px;
  }

  .site-nav {
    width: 100%;
    gap: 10px 12px;
  }

  .site-nav a,
  .footer-links a,
  .inline-link {
    font-size: 14px;
  }

  .actions .button {
    flex: 1 1 160px;
  }

  .result-intro strong {
    font-size: 24px;
  }

  .related-card {
    min-height: 0;
  }
}
