:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-tint: #eef6f4;
  --text: #111827;
  --muted: #475569;
  --muted-strong: #334155;
  --line: #d9e2ec;
  --primary: #0f766e;
  --primary-dark: #134e4a;
  --accent: #c2410c;
  --accent-soft: #fff7ed;
  --rose: #be123c;
  --focus: #2563eb;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeSpeed;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--text);
  color: white;
  padding: 0.6rem 0.8rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.header-inner,
.footer-inner,
.section-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.footer-brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

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

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.brand strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 600;
}

.ad-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 1rem auto;
}

.ad-wrap--top {
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}

.ad-wrap--bottom {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.ad-slot {
  display: block;
  width: 100%;
  min-height: 90px;
  overflow: hidden;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
}

.ad-slot--bottom {
  min-height: 250px;
}

.ad-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.main-nav a,
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
  padding: 0.58rem 0.78rem;
  border-radius: var(--radius);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--surface-tint);
  color: var(--primary-dark);
}

.main-nav a:hover {
  transform: translateY(-1px);
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 3rem;
  padding: 64px 0 50px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 4.4rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.2rem;
}

.hero-text,
.page-hero p,
.section-heading p,
.category-card p,
.tool-tile p {
  color: var(--muted);
}

.hero-text {
  max-width: 720px;
  margin: 1.35rem 0 0;
  font-size: 1.16rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button {
  padding: 0.78rem 1.05rem;
}

.button.primary {
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 12px 22px rgba(19, 78, 74, 0.18);
}

.button.secondary {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1px solid var(--line);
}

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

.hero-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  display: block;
  height: 6px;
  margin: -1rem -1rem 1rem;
  background: var(--primary);
}

.metric-card {
  background: var(--primary-dark);
  color: white;
  border-radius: var(--radius);
  padding: 1.55rem;
}

.metric-card span {
  display: block;
  font-size: 4rem;
  line-height: 1;
  font-weight: 800;
}

.metric-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

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

.quick-list a {
  padding: 0.92rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 800;
  background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.quick-list a:hover {
  background: var(--surface-tint);
  border-color: #99c9c2;
  transform: translateX(3px);
}

.category-overview,
.tools-section,
.page-hero {
  padding: 56px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.7rem;
}

.category-grid,
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.05rem;
}

.category-card,
.tool-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
  cursor: pointer;
}

.category-card::before,
.tool-tile::before,
.related-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.72;
}

.category-card::after,
.tool-tile::after,
.related-card::after {
  content: "Open >";
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin-top: auto;
  padding: 0.32rem 0.66rem;
  border: 1px solid #b8d6d1;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease;
}

.category-card h3,
.tool-tile h3 {
  color: var(--primary-dark);
  line-height: 1.25;
}

.category-card:hover,
.tool-tile:hover,
.faq-grid article:hover,
.sitemap-box:hover {
  transform: translateY(-2px);
  border-color: #99c9c2;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

.category-card:hover::after,
.tool-tile:hover::after,
.related-card:hover::after,
.category-card:focus-visible::after,
.tool-tile:focus-visible::after,
.related-card:focus-visible::after {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateX(2px);
}

.directory-card::after {
  content: none;
  display: none;
}

.directory-card {
  cursor: default;
}

.category-card {
  min-height: 340px;
}

.category-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.category-card ul {
  margin: 0.25rem 0 1.2rem;
  padding-left: 1.2rem;
  color: var(--muted-strong);
}

.calculator-link-list {
  display: grid;
  gap: 0.55rem;
  padding-left: 0;
  list-style: none;
}

.calculator-link-list a {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0.42rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.calculator-link-list a:hover,
.calculator-link-list a:focus-visible {
  background: var(--surface);
  border-color: #99c9c2;
  transform: translateX(2px);
}

.calculator-link-group {
  display: grid;
  gap: 0.65rem;
}

.calculator-link-list .parent-calculator-link {
  min-height: 42px;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.calculator-link-list .parent-calculator-link:hover,
.calculator-link-list .parent-calculator-link:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
}

.sub-calculator-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-left: 0.75rem;
  border-left: 2px solid #b8d6d1;
}

.sub-calculator-links a {
  width: auto;
  min-height: 30px;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  background: var(--surface);
}

.page-hero.compact {
  max-width: 920px;
}

.page-hero.compact h1 {
  font-size: 3.25rem;
  max-width: 820px;
}

.tool-tile h2 {
  font-size: 1.2rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.breadcrumb a,
.breadcrumb span {
  white-space: nowrap;
}

.breadcrumb a {
  color: var(--primary-dark);
  text-decoration: none;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 0.6rem;
  color: var(--muted-strong);
}

.prose-card {
  --prose-pad: clamp(1.35rem, 3vw, 2.4rem);
  --prose-pad-negative: clamp(-2.4rem, -3vw, -1.35rem);
  position: relative;
  max-width: var(--max);
  margin-bottom: 56px;
  padding: var(--prose-pad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.prose-card::before {
  content: "";
  display: block;
  height: 6px;
  margin: var(--prose-pad-negative) var(--prose-pad-negative) 1.75rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.prose-card > * {
  max-width: 880px;
}

.prose-card > .table-wrap,
.prose-card > .formula-note {
  max-width: none;
}

.prose-card h2 {
  position: relative;
  margin-top: 2.35rem;
  padding-top: 0.55rem;
  color: var(--text);
  font-size: clamp(1.45rem, 2.1vw, 2rem);
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--primary);
}

.prose-card h3 {
  margin-top: 1.7rem;
  color: var(--primary-dark);
  font-size: 1.18rem;
  line-height: 1.3;
}

.prose-card p,
.prose-card li {
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.78;
}

.prose-card p {
  margin: 0.8rem 0;
}

.prose-card ul,
.prose-card ol {
  display: grid;
  gap: 0.52rem;
  margin: 1rem 0 1.35rem;
  padding-left: 1.35rem;
}

.prose-card li::marker {
  color: var(--primary);
  font-weight: 900;
}

.prose-card strong {
  color: var(--text);
}

.prose-card a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration-color: rgba(15, 118, 110, 0.34);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose-card a:hover {
  color: var(--accent);
  text-decoration-color: rgba(194, 65, 12, 0.42);
}

.prose-card hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  margin: 1.15rem 0 1.65rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--surface);
}

.table-wrap th,
.table-wrap td {
  padding: 0.95rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--primary-dark);
  color: white;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.table-wrap tbody tr:nth-child(even) td {
  background: #f8fafc;
}

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

.contact-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding-bottom: 42px;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.contact-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.contact-item span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 900;
}

.contact-item h3,
.contact-item p {
  margin: 0;
}

.contact-item p,
.response-note,
.faq-grid p {
  color: var(--muted-strong);
}

.response-note {
  margin: 1rem 0 0;
  padding: 0.9rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.form-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-frame iframe {
  display: block;
  border: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 56px;
}

.faq-grid article,
.sitemap-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.faq-grid h2 {
  font-size: 1.1rem;
}

.search-panel {
  position: sticky;
  top: 73px;
  z-index: 4;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  background: #ffffff;
}

.tool-group-title {
  margin-bottom: 1rem;
  padding-left: 0.8rem;
  border-left: 5px solid var(--primary);
}

.empty-state {
  margin: 1rem 0 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted-strong);
  text-align: center;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 56px;
}

.sitemap-box ul {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.sitemap-box li {
  padding: 0.85rem;
  background: var(--surface-soft);
  border-radius: var(--radius);
}

.sitemap-box a,
.sitemap-box span {
  display: block;
}

.sitemap-box a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.sitemap-box span {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.calculator-shell {
  padding-bottom: 64px;
}

.calculator-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calculator-card h2 {
  color: var(--primary-dark);
}

.input-preview {
  padding: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.input-preview ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted-strong);
}

.tank-lab {
  padding-bottom: 56px;
}

.tank-calc-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.tank-input-section,
.tank-result-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.calculator-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.unit-control {
  display: grid;
  gap: 0.35rem;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.unit-control select,
.input-grid select,
.input-grid input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.unit-control select,
.input-grid select {
  padding: 0.55rem 0.7rem;
}

.segmented-field {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.segmented-field legend {
  margin-bottom: 0.45rem;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 0.35rem;
  padding: 0.28rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-strong);
  font-weight: 900;
}

.segmented-control input:checked + span {
  background: var(--primary-dark);
  color: white;
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.tank-visual-card {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tank-visual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.tank-visual-header h3 {
  font-size: 1.05rem;
}

.tank-visual-header span {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #7c2d12;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.tank-3d-canvas {
  position: relative;
  width: 100%;
  min-height: 280px;
  overflow: hidden;
  background: #eef6f4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tank-3d-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.canvas-watermark {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  z-index: 2;
  padding: 0.18rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted-strong);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  pointer-events: none;
}

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

.input-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted-strong);
  font-weight: 800;
}

.input-grid input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-weight: 800;
}

.formula-note {
  margin-top: 1rem;
  padding: 0.9rem;
  background: var(--surface-soft);
  border: 1px solid #cfe2d4;
  border-radius: var(--radius);
  color: var(--primary-dark);
}

.prose-card .formula-note {
  display: block;
  position: relative;
  margin: 1.05rem 0 1.35rem;
  padding: 1rem 1rem 1rem 1.15rem;
  background: #f8fafc;
  border-color: #cfe2d4;
  border-left: 5px solid var(--primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.prose-card .formula-note strong {
  color: var(--primary-dark);
}

.tank-result-section {
  display: grid;
  gap: 1rem;
}

.main-result-card.themed {
  padding: 1.15rem;
  background: var(--primary-dark);
  color: white;
  border-radius: var(--radius);
}

.result-label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-display-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.result-display-wrapper span:first-child {
  font-size: 3rem;
  line-height: 1;
  font-weight: 900;
}

.inline-unit {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

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

.result-grid div,
.conversion-box,
.step-box {
  padding: 0.95rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-grid span,
.conversion-row span {
  display: block;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 800;
}

.result-grid strong,
.conversion-row strong {
  color: var(--text);
}

.conversion-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.conversion-row:first-of-type {
  border-top: 0;
}

.finance-chart-card {
  padding: 0.95rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.finance-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.finance-chart-heading p {
  margin: 0;
}

.finance-chart-heading span {
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
}

.finance-line-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
}

.finance-line-chart > rect {
  fill: #ffffff;
  stroke: var(--line);
}

.chart-grid line {
  stroke: rgba(100, 116, 139, 0.22);
  stroke-width: 1;
}

.chart-loss-area {
  fill: rgba(239, 68, 68, 0.12);
}

.chart-profit-area {
  fill: rgba(15, 118, 110, 0.12);
}

.chart-revenue-line {
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.chart-cost-line {
  stroke: #ef4444;
  stroke-width: 4;
  stroke-linecap: round;
}

.chart-marker-line {
  stroke: var(--text);
  stroke-width: 2;
  stroke-dasharray: 5 6;
}

.chart-marker-dot {
  fill: var(--text);
  stroke: #ffffff;
  stroke-width: 2;
}

.chart-marker-text,
.chart-axis-label,
.chart-legend {
  fill: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
}

.chart-legend-revenue {
  fill: var(--accent-strong);
}

.chart-legend-cost {
  fill: #b91c1c;
}

.markup-visual-card {
  display: grid;
  gap: 1rem;
}

.markup-stacked-visual {
  display: grid;
  gap: 0.55rem;
}

.markup-stacked-track {
  display: flex;
  width: 100%;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.markup-cost-segment,
.markup-profit-segment {
  min-width: 0;
  transition: width 0.18s ease;
}

.markup-cost-segment {
  background: rgba(100, 116, 139, 0.36);
}

.markup-profit-segment {
  background: var(--accent);
}

.markup-profit-segment.is-negative {
  background: #ef4444;
}

.markup-stacked-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 850;
}

.markup-stacked-labels strong {
  color: var(--text);
}

.markup-bar-compare {
  display: grid;
  gap: 0.75rem;
}

.markup-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 72px;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 850;
}

.markup-bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.16);
}

.markup-bar-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.18s ease;
}

.markup-bar-track div.is-negative {
  background: #ef4444;
}

.markup-bar-row strong {
  color: var(--text);
  text-align: right;
}

.packing-preview-card {
  display: grid;
  gap: 1rem;
}

.packing-layout-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 46%),
    #ffffff;
  padding: 1rem;
}

.packing-layout-preview {
  display: grid;
  grid-template-columns: repeat(var(--packing-columns, 1), minmax(0, 1fr));
  gap: 0.42rem;
  max-width: 520px;
  margin: 0 auto;
}

.packing-dot {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0 14%, rgba(94, 234, 212, 0.52) 15% 34%, rgba(15, 118, 110, 0.88) 72%);
  box-shadow: inset -5px -7px 12px rgba(15, 23, 42, 0.12), 0 6px 12px rgba(15, 23, 42, 0.08);
}

.packing-dot.is-empty {
  border-style: dashed;
  background: rgba(100, 116, 139, 0.08);
  box-shadow: none;
}

.packing-layout-meta {
  display: grid;
  gap: 0.4rem;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 850;
}

.packing-layout-meta span:first-child {
  color: var(--text);
}

.body-composition-card {
  display: grid;
  gap: 1rem;
}

.body-composition-track {
  display: flex;
  width: 100%;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.body-composition-lean,
.body-composition-fat {
  min-width: 0;
  transition: width 0.18s ease;
}

.body-composition-lean {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.92), rgba(20, 184, 166, 0.82));
}

.body-composition-fat {
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.88), rgba(251, 191, 36, 0.74));
}

.body-composition-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 850;
}

.copy-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.6rem;
  margin: 0.7rem 0 0.85rem;
}

.copy-result-button {
  appearance: none;
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: #ffffff;
  color: var(--accent-strong);
  border-radius: 8px;
  padding: 0.62rem 0.82rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.copy-result-button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.52);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.copy-result-button:disabled {
  cursor: default;
  opacity: 0.78;
  transform: none;
}

.copy-result-button--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.copy-result-button--secondary:hover {
  border-color: rgba(15, 23, 42, 0.28);
}

.share-cite-open {
  overflow: hidden;
}

.share-cite-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.52);
}

.share-cite-modal[hidden] {
  display: none;
}

.share-cite-dialog {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 2.5rem));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

.share-cite-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.4rem 0.75rem;
}

.share-cite-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
}

.share-cite-header p {
  margin: 0.25rem 0 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.share-cite-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.share-cite-close:hover {
  background: var(--surface);
}

.share-cite-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0 1.4rem;
  border-bottom: 1px solid var(--line);
}

.share-cite-tab {
  appearance: none;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  padding: 0.95rem 0.5rem;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.share-cite-tab.is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

.share-cite-panel {
  display: none;
  padding: 1.35rem 1.4rem 1.45rem;
}

.share-cite-panel.is-active {
  display: block;
}

.share-cite-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 750;
}

.share-cite-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.share-network-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.35rem 0;
}

.share-network-grid a {
  display: grid;
  place-items: center;
  gap: 0.55rem;
  min-height: 96px;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
  background: var(--surface);
}

.share-network-grid a:hover {
  border-color: rgba(15, 118, 110, 0.35);
  background: #ffffff;
}

.share-network-grid span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
}

.share-copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.share-copy-row input,
.citation-layout textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

.share-copy-row input {
  min-width: 0;
  padding: 0.76rem 0.85rem;
}

.citation-layout {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.9rem;
}

.citation-tabs {
  display: grid;
  align-content: start;
  gap: 0.25rem;
}

.citation-format {
  appearance: none;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 0.72rem 0.55rem;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.citation-format.is-active {
  border-left-color: var(--accent);
  color: var(--accent-strong);
  background: var(--surface);
}

.citation-layout textarea {
  min-height: 150px;
  resize: vertical;
  padding: 0.9rem;
}

.share-cite-note {
  margin: 1rem 0;
  color: var(--muted-strong);
}

@media (max-width: 640px) {
  .share-cite-modal {
    align-items: end;
    padding: 0.75rem;
  }

  .share-cite-dialog {
    max-height: calc(100vh - 1.5rem);
    border-radius: 14px 14px 10px 10px;
  }

  .share-cite-header,
  .share-cite-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .share-cite-tabs {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

  .share-copy-row,
  .citation-layout {
    grid-template-columns: 1fr;
  }

  .citation-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .citation-format {
    border-left: 0;
    border-bottom: 3px solid transparent;
    text-align: center;
  }

  .citation-format.is-active {
    border-bottom-color: var(--accent);
  }
}

.step-box ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted-strong);
}

.tank-guide {
  margin-top: 0;
}

.tank-guide ol {
  color: var(--muted-strong);
}

.related-calculators {
  margin-top: -24px;
  margin-bottom: 56px;
}

.compact-heading {
  margin-bottom: 1rem;
}

.compact-heading h2 {
  font-size: 1.9rem;
}

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

.related-card {
  position: relative;
  display: grid;
  gap: 0.3rem;
  min-height: 132px;
  padding: 1rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
  cursor: pointer;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: #99c9c2;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
}

.related-card span,
.related-card small {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.related-card span {
  color: var(--accent);
  letter-spacing: 0;
  text-transform: uppercase;
}

.related-card strong {
  color: var(--primary-dark);
  line-height: 1.25;
}

.guide-formula {
  display: inline-block;
  margin: 0.4rem 0 0.75rem;
}

.prose-card .guide-formula {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: 1.03rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 38px 0;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p,
.copyright {
  color: var(--muted-strong);
}

.copyright {
  width: min(var(--max), calc(100% - 32px));
  margin: 1.25rem auto 0;
  font-size: 0.9rem;
}

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

  h2 {
    font-size: 1.75rem;
  }

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

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 2rem;
  }

  .category-grid,
  .tools-grid,
  .related-grid,
  .contact-layout,
  .faq-grid,
  .sitemap-grid,
  .calculator-card,
  .tank-calc-card {
    grid-template-columns: 1fr;
  }

  .calculator-title-row {
    flex-direction: column;
  }

  .tank-visual-header {
    flex-direction: column;
  }
}

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

  h2 {
    font-size: 1.55rem;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .main-nav a {
    padding: 0.45rem 0.55rem;
  }

  .brand small {
    display: none;
  }

  .ad-wrap {
    width: min(100% - 20px, var(--max));
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .ad-slot {
    min-height: 100px;
    border-radius: 6px;
  }

  .ad-slot--bottom {
    min-height: 280px;
  }

  .page-hero {
    padding: 34px 0;
  }

  .page-hero.compact h1 {
    font-size: 2.25rem;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .page-hero p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .breadcrumb {
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.2rem;
    overflow-x: auto;
    font-size: 0.8rem;
    scrollbar-width: none;
  }

  .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .breadcrumb a::after {
    margin-left: 0.45rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

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