/* ===== FLATCORE v37 — cutaway infographic based on propane-cutaway.png ===== */

#tank-animation.tank-section--cutaway{
  padding-top:18px;
  padding-bottom:22px;
}

.tank-cutaway-grid{
  display:grid;
  grid-template-columns:minmax(0,1.78fr) minmax(320px,.62fr);
  gap:18px;
  align-items:stretch;
}

.tank-cutaway-card,
.tank-cutaway-panel{
  background:linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface2) 96%, transparent),
    color-mix(in srgb, var(--surface) 96%, transparent)
  );
  border:1px solid var(--stroke);
  box-shadow:var(--shadow);
  border-radius:28px;
}

.tank-cutaway-card{ overflow:hidden; }

.tank-cutaway-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 18px 12px;
}

.tank-cutaway-topbar__label{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:color-mix(in srgb, var(--surface) 86%, transparent);
  border:1px solid var(--stroke);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tank-cutaway-topbar__modes{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.mode-pill{
  appearance:none;
  border:1px solid var(--strokeStrong);
  background:var(--btnBg);
  color:var(--text);
  border-radius:999px;
  padding:10px 16px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  transition:
    background var(--t-base) ease,
    color var(--t-base) ease,
    border-color var(--t-base) ease,
    transform var(--t-base) ease;
}

.mode-pill:hover{
  background:var(--btnBgHover);
  transform:translateY(-1px);
}

.mode-pill.is-active{
  background:linear-gradient(135deg, var(--accentA), var(--accentB));
  color:#fff;
  border-color:transparent;
}

.tank-cutaway-stage{
  position:relative;
  min-height:980px;
  padding:18px 18px 190px;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accentA) 14%, transparent), transparent 34%),
    radial-gradient(circle at 84% 10%, color-mix(in srgb, var(--accentB) 12%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(8,16,31,.96), rgba(7,13,24,.98));
}

html[data-theme="light"] .tank-cutaway-stage{
  background:
    radial-gradient(circle at 50% 18%, rgba(30,78,216,.08), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(15,118,110,.06), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(242,246,254,.98));
}

.tank-cutaway-stage__grid{
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(180deg, rgba(0,0,0,.9), rgba(0,0,0,.2));
  pointer-events:none;
}

html[data-theme="light"] .tank-cutaway-stage__grid{
  background-image:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.05) 1px, transparent 1px);
}

.tank-cutaway-stage__glow{
  position:absolute;
  inset:auto 10% 6% 10%;
  height:180px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(107,140,255,.22), transparent 68%);
  filter:blur(32px);
  opacity:.8;
  pointer-events:none;
}

.tank-cutaway-stage.is-cng .tank-cutaway-stage__glow{
  background:radial-gradient(circle, rgba(31,182,170,.22), transparent 68%);
}

.tank-cutaway-figure{
  position:relative;
  z-index:2;
  width:min(100%, 1180px);
  margin:20px auto 0;
}

.tank-cutaway-image{
  width:100%;
  height:auto;
  display:block;
  filter:drop-shadow(0 24px 40px rgba(0,0,0,.28));
  border-radius:24px;
}

.tank-cutaway-chip{
  position:absolute;
  z-index:3;
  max-width:260px;
  padding:12px 14px;
  border-radius:18px;
  background:rgba(10,17,32,.70);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 18px 30px rgba(2,8,20,.24);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

html[data-theme="light"] .tank-cutaway-chip{
  background:rgba(255,255,255,.92);
  border-color:rgba(15,23,42,.12);
}

.tank-cutaway-chip strong{
  display:block;
  color:#f5f9ff;
  font-size:15px;
  line-height:1.25;
}

.tank-cutaway-chip span{
  display:block;
  margin-top:6px;
  color:rgba(231,239,255,.92);
  font-size:12px;
  line-height:1.45;
}

html[data-theme="light"] .tank-cutaway-chip strong{ color:#12233f; }
html[data-theme="light"] .tank-cutaway-chip span{ color:#334b6a; }

.tank-cutaway-chip::after{
  content:"";
  position:absolute;
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--accentA), var(--accentB));
  box-shadow:0 0 0 6px color-mix(in srgb, var(--accentA) 15%, transparent);
}

.tank-cutaway-chip--shell{ left:28px; top:112px; }
.tank-cutaway-chip--shell::after{ right:-18px; top:42px; }

.tank-cutaway-chip--liner{ left:44px; top:360px; }
.tank-cutaway-chip--liner::after{ right:-18px; top:30px; }

.tank-cutaway-chip--core{ left:70px; bottom:252px; }
.tank-cutaway-chip--core::after{ right:-18px; top:40px; }

.tank-cutaway-chip--valve{ right:210px; bottom:310px; max-width:300px; }
.tank-cutaway-chip--valve::after{ left:-18px; top:38px; }

.tank-cutaway-chip--volume{ right:36px; top:236px; max-width:280px; }
.tank-cutaway-chip--volume::after{ left:-18px; top:32px; }

.tank-cutaway-rail{
  position:absolute;
  left:28px;
  right:28px;
  bottom:42px;
  z-index:3;
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:12px;
  align-items:end;
}

.tank-cutaway-rail::before{
  content:"";
  position:absolute;
  left:30px;
  right:30px;
  top:26px;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
}

html[data-theme="light"] .tank-cutaway-rail::before{
  background:rgba(15,23,42,.10);
}

.tank-cutaway-flow{
  position:absolute;
  left:30px;
  right:30px;
  top:26px;
  height:8px;
  border-radius:999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(56,225,255,0) 0 16px,
      rgba(56,225,255,.95) 16px 28px,
      rgba(56,225,255,0) 28px 44px
    );
  opacity:.95;
  animation:cutawayFlow 1.1s linear infinite;
}

@keyframes cutawayFlow{
  from{ transform:translateX(0); }
  to{ transform:translateX(44px); }
}

.tank-cutaway-stage.is-cng .tank-cutaway-flow{
  background:
    repeating-linear-gradient(
      90deg,
      rgba(31,182,170,0) 0 16px,
      rgba(31,182,170,.95) 16px 28px,
      rgba(31,182,170,0) 28px 44px
    );
}

.tank-cutaway-node{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.tank-cutaway-node span{
  width:64px;
  height:64px;
  border-radius:50%;
  border:4px solid rgba(159,184,255,.65);
  background:linear-gradient(180deg, rgba(255,255,255,.94), rgba(196,210,250,.88));
  box-shadow:0 0 0 8px rgba(107,140,255,.12), 0 18px 30px rgba(2,8,20,.16);
}

.tank-cutaway-node.is-active span{
  background:radial-gradient(circle at 35% 35%, #bffcff, #67d5d1 62%, #2e7f93 100%);
  border-color:rgba(140,255,241,.82);
  box-shadow:0 0 0 10px rgba(31,182,170,.14), 0 18px 30px rgba(2,8,20,.16);
}

.tank-cutaway-node b{
  color:#f5f9ff;
  font-size:15px;
}

html[data-theme="light"] .tank-cutaway-node b{ color:#1b2c47; }

.tank-cutaway-docs{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:12px;
  padding:12px 18px 18px;
}

.tank-cutaway-doc{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:color-mix(in srgb, var(--surface) 86%, transparent);
}

.tank-cutaway-doc strong{
  display:inline-grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:10px;
  background:color-mix(in srgb, var(--accentA) 28%, transparent);
  color:#fff;
  font-size:12px;
}

.tank-cutaway-doc div{
  color:var(--text);
  line-height:1.25;
}

.tank-cutaway-doc small{ color:var(--muted); }

.tank-cutaway-panel{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.tank-cutaway-panel__eyebrow{
  color:var(--muted);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:10px;
}

.tank-cutaway-panel__switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.mode-card{
  appearance:none;
  border:1px solid var(--stroke);
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  color:var(--text);
  border-radius:18px;
  padding:14px 14px 12px;
  text-align:left;
  cursor:pointer;
  transition:
    background var(--t-base) ease,
    border-color var(--t-base) ease,
    transform var(--t-base) ease;
}

.mode-card:hover{
  transform:translateY(-1px);
  background:var(--btnBgHover);
}

.mode-card.is-active{
  border-color:transparent;
  background:linear-gradient(135deg, var(--accentA), var(--accentB));
  color:#fff;
  box-shadow:0 16px 28px color-mix(in srgb, var(--accentA) 18%, transparent);
}

.mode-card__title{
  display:block;
  font-size:20px;
  font-weight:900;
  line-height:1;
}

.mode-card__meta{
  display:block;
  margin-top:6px;
  font-size:12px;
  opacity:.9;
}

.tank-cutaway-panel__specs{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.mode-spec{
  padding:14px 14px 12px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:color-mix(in srgb, var(--surface) 88%, transparent);
}

.mode-spec span{
  display:block;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.mode-spec strong{
  display:block;
  margin-top:7px;
  color:var(--text);
  line-height:1.35;
}

.tank-cutaway-panel__why h3{
  margin:0 0 12px;
  color:var(--text);
  line-height:1.08;
}

.tank-cutaway-panel__why-cards{
  display:grid;
  gap:12px;
}

.tank-cutaway-panel__why-card{
  padding:14px 14px 12px;
  border-radius:18px;
  border:1px solid var(--stroke);
  background:color-mix(in srgb, var(--surface) 88%, transparent);
}

.tank-cutaway-panel__why-card h4{
  margin:0 0 8px;
  color:var(--text);
}

.tank-cutaway-panel__why-card p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

/* Contrast corrections */
html[data-theme="dark"] #tank-animation .tank-cutaway-stage,
html[data-theme="dark"] #tank-animation .tank-cutaway-panel,
html[data-theme="dark"] #tank-animation .tank-cutaway-card{
  color:#eef5ff;
}

html[data-theme="light"] #tank-animation .tank-cutaway-stage,
html[data-theme="light"] #tank-animation .tank-cutaway-panel,
html[data-theme="light"] #tank-animation .tank-cutaway-card{
  color:#12233f;
}

html[data-theme="light"] #tank-animation .tank-cutaway-topbar__label,
html[data-theme="light"] #tank-animation .tank-cutaway-panel__eyebrow{
  color:#425977;
}

html[data-theme="light"] #tank-animation .tank-cutaway-panel__why-card p,
html[data-theme="light"] #tank-animation .mode-spec strong{
  color:#1d3352;
}

html[data-theme="light"] #tank-animation .mode-spec span{
  color:#546b88;
}

/* Hide obsolete old internals if present */
#tank-animation .tank-pressure,
#tank-animation .tank-pressure__meter,
#tank-animation .tank-pressure__track,
#tank-animation .tank-pressure__progress,
#tank-animation .tank-pressure__knob,
#tank-animation .pressure-gauge,
#tank-animation .tank-callout__measure,
#tank-animation .tank-callout__measure-arrow,
#tank-animation .tank-callout__measure-text,
#tank-animation .tank-stage__headline strong{
  display:none !important;
}

@media (max-width:1320px){
  .tank-cutaway-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:980px){
  .tank-cutaway-stage{
    min-height:920px;
    padding-bottom:210px;
  }

  .tank-cutaway-chip--shell{ left:18px; top:102px; max-width:210px; }
  .tank-cutaway-chip--liner{ left:18px; top:320px; max-width:210px; }
  .tank-cutaway-chip--core{ left:18px; bottom:272px; max-width:220px; }
  .tank-cutaway-chip--valve{ right:18px; bottom:300px; max-width:230px; }
  .tank-cutaway-chip--volume{ right:18px; top:214px; max-width:220px; }

  .tank-cutaway-docs{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:760px){
  .tank-cutaway-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .tank-cutaway-stage{
    min-height:auto;
    padding:16px 12px 190px;
  }

  .tank-cutaway-figure{
    margin-top:70px;
  }

  .tank-cutaway-chip{
    position:relative;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    max-width:none !important;
    margin:10px 0 0;
  }

  .tank-cutaway-chip::after{ display:none; }

  .tank-cutaway-rail{
    left:14px;
    right:14px;
    bottom:28px;
    gap:8px;
  }

  .tank-cutaway-node span{
    width:50px;
    height:50px;
  }

  .tank-cutaway-node b{
    font-size:12px;
    text-align:center;
  }

  .tank-cutaway-docs{
    grid-template-columns:1fr;
    padding:12px;
  }

  .tank-cutaway-panel__switch{
    grid-template-columns:1fr;
  }
}
/* v37.1 cutaway fixes */
#tank-restart { position: relative; z-index: 5; }
.tank-cutaway-topbar, .tank-cutaway-stage, .tank-cutaway-panel { position: relative; }
.mode-pill, .mode-card { position: relative; z-index: 4; }
.tank-cutaway-chip { display:flex; flex-direction:column; justify-content:center; min-height:74px; }
.tank-cutaway-chip strong { margin:0; line-height:1.22; }
.tank-cutaway-chip span { margin-top:4px; line-height:1.38; }
.tank-cutaway-chip--shell { left:24px; top:150px; width:200px; }
.tank-cutaway-chip--liner { left:28px; top:336px; width:220px; }
.tank-cutaway-chip--core { left:30px; bottom:184px; width:240px; }
.tank-cutaway-chip--volume { right:18px; top:260px; width:210px; }
.tank-cutaway-chip--valve { right:34px; bottom:196px; width:260px; transform: translateY(-30px); }
.tank-cutaway-node b { min-width:92px; text-align:center; }
html[data-theme="dark"] .tank-cutaway-image { content:url('/assets/img/propane-cutaway-dark.png'); }
html[data-theme="light"] .tank-cutaway-image { content:url('/assets/img/propane-cutaway-light.png'); }
@media (max-width:980px){ .tank-cutaway-chip--shell, .tank-cutaway-chip--liner, .tank-cutaway-chip--core, .tank-cutaway-chip--volume, .tank-cutaway-chip--valve { transform:none; } }
.tank-cutaway-node{
  transition: transform .25s ease, opacity .25s ease;
}

.tank-cutaway-node.is-active{
  transform: translateY(-4px);
}

.tank-cutaway-node.is-active span{
  box-shadow:
    0 0 0 10px rgba(31,182,170,.18),
    0 0 24px rgba(56,225,255,.45),
    0 18px 30px rgba(2,8,20,.16);
}

.tank-cutaway-stage.is-demo .tank-cutaway-flow{
  opacity: 1;
  animation: cutawayFlow .7s linear infinite;
}
