/* EnCo (Energia Collettiva) — "Tessera" visual system */
:root {
  --bg: #FBF6EC;
  --text: #1F2A24;
  --accent: #2F5D50;
  --primary: #A8432A;
  --surface: #F1E8D6;
  --sun: #F2B33D;          /* decoration only, never text */
  --primary-dark: #8A3220;
  --muted: #5E584C;
  --line: #DCCFB8;
  --outline: #6B6457;
  --error: #B3261E;
  --white: #FFFFFF;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 4px;
  --max: 1200px;
  --gutter: clamp(16px, 5vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
@media (min-width: 960px) { body { font-size: 18px; } }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.05rem, 5.2vw, 3.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
ul, ol { padding-left: 1.25em; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--white); padding: 12px 16px; border-radius: var(--radius);
}
.skip:focus { top: 8px; color: var(--white); }

.container {
  width: min(100%, calc(var(--max) + 2 * var(--gutter)));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 46rem; }
.muted { color: var(--muted); }
.mt-24 { margin-top: 24px; }
.small { font-size: .9rem; line-height: 1.5; }

/* Tile rule: thin row of tessera tiles used as a section separator */
.tile-rule {
  height: 10px;
  background: repeating-linear-gradient(90deg,
    var(--primary) 0 10px, transparent 10px 14px,
    var(--accent) 14px 24px, transparent 24px 28px,
    var(--sun) 28px 38px, transparent 38px 42px,
    var(--line) 42px 52px, transparent 52px 56px);
  opacity: .9;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand join" "nav nav";
  align-items: center;
  column-gap: 12px;
  padding-top: 8px;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; min-height: 48px; }
.brand img { height: 48px; width: auto; border-radius: var(--radius); }
.btn-join { grid-area: join; }
.site-nav { grid-area: nav; min-width: 0; }
.nav-list {
  list-style: none; margin: 0; padding: 4px 0 8px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
}
.nav-list a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  color: var(--text); text-decoration: none; white-space: nowrap; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--line); color: var(--text); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--primary); }
@media (min-width: 1040px) {
  .site-header { position: sticky; top: 0; }
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav join";
    padding-block: 8px;
  }
  .brand img { height: 56px; }
  .nav-list { justify-content: center; padding: 0; overflow: visible; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 20px; border-radius: var(--radius);
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; text-align: center;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--surface); color: var(--accent); }
.btn-light { background: var(--bg); color: var(--accent); border-color: var(--bg); }
.btn-light:hover { background: var(--surface); color: var(--accent); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-text { background: none; border: 0; color: var(--primary); text-decoration: underline; padding-inline: 8px; }
.btn[disabled] { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-join { padding-inline: 14px; }
@media (max-width: 380px) { .btn-join { font-size: .9rem; padding-inline: 10px; } }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 2px; font-size: .9rem; font-weight: 600;
  border: 1px solid var(--accent); color: var(--accent); background: var(--bg);
}
.chip::before { content: ""; width: 10px; height: 10px; background: var(--accent); border-radius: 1px; }
.chip-coming { border: 1px dashed var(--outline); color: var(--text); background: var(--surface); }
.chip-coming::before { background: var(--line); border: 1px solid var(--outline); }
.badge-sample {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--text);
  border-left: 8px solid var(--sun); border-radius: 2px; background: var(--bg);
  font-size: .9rem; font-weight: 600;
}

/* Sections */
.section { padding-block: clamp(40px, 7vw, 80px); }
.section-tight { padding-block: clamp(28px, 5vw, 48px); }
.section-surface { background: var(--surface); }
.eyebrow { font-weight: 700; color: var(--primary); margin-bottom: 8px; font-size: .95rem; }
.lede { font-size: 1.1rem; max-width: 42rem; }
.tagline { font-family: var(--font-head); font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--accent); }

/* Home hero */
.hero { padding-block: 32px 24px; }
.hero-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hero-text > * { max-width: 36rem; }
.hero-media img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
@media (min-width: 960px) {
  .hero { padding-block: 48px 32px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
}
.filter { margin-top: 20px; }
.filter-label { font-weight: 700; margin-bottom: 8px; display: block; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.filter-chip {
  min-height: 48px; padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--outline); background: var(--bg); color: var(--text);
  font: 600 .98rem/1.2 var(--font-body); cursor: pointer;
}
.filter-chip:hover { background: var(--surface); }
.filter-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.filter-status { margin: 12px 0 0; font-size: .95rem; color: var(--muted); min-height: 1.5em; }

/* Mosaic */
.mosaic {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
}
.mosaic li { min-width: 0; }
.mosaic li[hidden] { display: none; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  height: 100%; min-height: 168px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
@media (min-width: 600px) { .tile { aspect-ratio: 1 / 1; } }
.tile:hover { border-color: var(--outline); color: var(--text); }
.tile-kind { font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.tile-tool { border-top: 6px solid var(--primary); }
.tile-tool .tile-kind { color: var(--primary); }
.tile-aud { border-top: 6px solid var(--accent); }
.tile-aud .tile-kind { color: var(--accent); }
.tile-step { border-top: 6px solid var(--sun); background: var(--bg); }
.tile-step .tile-kind { color: var(--muted); }
.tile-title { font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; font-weight: 600; }
.tile-text { font-size: .92rem; line-height: 1.45; color: var(--muted); }

/* Steps Develop → Run → Share */
.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative;
}
.steps li::before {
  counter-increment: s; content: counter(s);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--white); font: 700 1.1rem var(--font-head);
}
.steps li:nth-child(1) { border-bottom: 6px solid var(--primary); }
.steps li:nth-child(2) { border-bottom: 6px solid var(--accent); }
.steps li:nth-child(3) { border-bottom: 6px solid var(--sun); }

/* Cards */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 24px 0 0; padding: 0; list-style: none; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-width: 0; display: flex; flex-direction: column; gap: 4px;
}
.card h3 { margin-bottom: 4px; }
.card > :last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; font-weight: 700; }
.card-dashed { border: 1px dashed var(--outline); background: var(--bg); }

.split { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; } }

/* Roadmap board */
.roadmap { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); list-style: none; padding: 0; margin: 16px 0; }
@media (min-width: 760px) { .roadmap-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.roadmap > li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.section-surface .roadmap > li { background: var(--bg); }
.roadmap h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.1rem; }
.roadmap ul { margin: 0; padding-left: 1.1em; }
.roadmap li li { margin-bottom: 4px; }

/* Bands */
.band { background: var(--accent); color: var(--white); }
.band a:not(.btn) { color: var(--white); }
.band h2 { color: var(--white); }
.band .btn-row { margin-top: 16px; }

/* Forms */
.form { display: grid; gap: 18px; max-width: 40rem; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-weight: 700; font-size: .98rem; }
.help { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.45; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; max-width: 100%; min-height: 48px; padding: 10px 12px;
  font: 400 1rem/1.4 var(--font-body); color: var(--text);
  background: var(--white); border: 1px solid var(--outline); border-radius: var(--radius);
}
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
[aria-invalid="true"] { border: 2px solid var(--error) !important; }
.field-error { color: var(--error); font-weight: 600; font-size: .92rem; margin: 0; }
.field-error::before { content: "! "; }
.form-msg { margin: 0; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; }
.form-msg:empty { display: none; }
.form-msg.is-ok { background: var(--bg); color: var(--accent); border: 2px solid var(--accent); }
.form-msg.is-err { background: var(--bg); color: var(--error); border: 2px solid var(--error); }
.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.band .form-msg.is-ok, .band .form-msg.is-err { color: var(--text); }
.band .help { color: var(--white); }
.band label { color: var(--white); }
.band .field-error { color: var(--white); background: var(--error); padding: 4px 8px; border-radius: 2px; }
.signup-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .signup-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }

/* Page header */
.page-head { padding-block: 40px 24px; }
.page-head .lede { margin-bottom: 0; }

/* Platform */
.with-index { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.mini-index { display: none; }
@media (min-width: 960px) {
  .with-index { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .mini-index { display: block; }
  .mini-index nav { position: sticky; top: 104px; }
}
.mini-index ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.mini-index a { display: block; padding: 10px 16px; color: var(--text); text-decoration: none; font-weight: 600; }
.mini-index a:hover { color: var(--primary); }
.stage { padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.stage-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius); margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 4px solid var(--primary);
  font: 700 1.3rem var(--font-head);
}
.status-box {
  background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--accent);
  border-radius: var(--radius); padding: 20px; margin: 24px 0;
}
.status-box > :last-child, .not-box > :last-child { margin-bottom: 0; }
.not-box { border: 1px dashed var(--outline); border-radius: var(--radius); padding: 20px; margin: 32px 0; }

/* Who it's for */
.banner img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 900px) { .banner img { aspect-ratio: 12 / 5; } }
.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.jump a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 14px;
  border: 1px solid var(--outline); border-radius: var(--radius); color: var(--text);
  text-decoration: none; font-weight: 600; background: var(--bg);
}
.jump a:hover { background: var(--surface); color: var(--text); }
.path { padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.path-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .path-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px; gap: 32px; } }
.path h3 { font-size: 1rem; color: var(--accent); margin-bottom: 4px; }
.start-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--primary);
  border-radius: var(--radius); text-decoration: none; color: var(--text); align-self: start;
}
.start-tile:hover { border-color: var(--outline); color: var(--text); }
.start-tile .k { font-size: .85rem; font-weight: 700; color: var(--primary); }
.start-tile .t { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }

/* About */
.about-split { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.about-split img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 600px) and (max-width: 899px) { .about-split img { max-width: 420px; } }
@media (min-width: 900px) { .about-split { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; } }
.mission { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 8px; }
.mission li { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--primary); border-radius: var(--radius); padding: 16px 18px; }
.mission li:nth-child(2) { border-left-color: var(--accent); }
.mission li:nth-child(3) { border-left-color: var(--sun); }
.grid-2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; padding: 0; margin: 20px 0; }
.grid-2 li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }

/* Contact */
.contact-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 28px); min-width: 0; }

/* Pricing */
.plans { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan { border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.plan-now { background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--accent); }
.plan-coming { background: var(--bg); border: 1px dashed var(--outline); }
.plan h2 { margin: 0; font-size: 1.7rem; }
.plan ul { margin: 0; }
.plan .btn { align-self: flex-start; margin-top: auto; }
.faq { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .faq { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
details.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
details.q summary { cursor: pointer; font-weight: 700; min-height: 48px; padding: 12px 0; }
details.q p { margin: 0 0 16px; }

/* Legal */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.5rem; margin-top: 1.6em; }

/* 404 */
.notfound { text-align: center; padding-block: 40px 64px; }
.notfound img { margin: 0 auto 24px; width: 100%; max-width: 560px; border-radius: var(--radius); border: 1px solid var(--line); }
.notfound .btn-row { justify-content: center; }

/* Tools */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.tab {
  min-height: 48px; padding: 10px 16px; border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--line); border-bottom: 4px solid transparent; background: var(--surface);
  font: 700 1rem/1.2 var(--font-body); color: var(--text); cursor: pointer; flex: 1 1 200px;
}
.tab[aria-selected="true"] { background: var(--bg); border-color: var(--outline); border-bottom-color: var(--primary); }
.tool-panel { padding-block: 32px 56px; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.tool-panel[hidden] { display: none; }
.tool-intro { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; margin-bottom: 28px; }
.tool-intro img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); object-fit: cover; }
.tool-intro .img-sq { max-width: 320px; aspect-ratio: 1 / 1; }
.tool-intro .img-wide { aspect-ratio: 3 / 2; }
@media (min-width: 860px) {
  .tool-intro { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; }
  .tool-intro .img-sq { max-width: 360px; justify-self: end; }
}
.tool-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .tool-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; } }
.tool-inputs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 4vw, 24px); display: grid; gap: 18px; min-width: 0; }
.tool-results { min-width: 0; }
details.assume { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px 14px; }
details.assume summary { cursor: pointer; font-weight: 700; min-height: 48px; padding: 12px 0; }
details.assume .field + .field { margin-top: 14px; }
.input-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.estimate-label {
  background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--sun);
  border-radius: var(--radius); padding: 10px 14px; font-weight: 700; margin: 0 0 16px;
}
.empty-state { border: 1px dashed var(--outline); border-radius: var(--radius); padding: 24px; color: var(--muted); }
.numtiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 0 0 16px; padding: 0; list-style: none; }
.numtiles li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.numtiles .n { font: 700 1.5rem/1.2 var(--font-head); display: block; margin-top: 4px; }
.numtiles .l { font-size: .85rem; font-weight: 700; color: var(--muted); }
.chart-frame { margin: 8px 0 16px; }
.chart-frame svg { width: 100%; height: auto; display: block; }
.scroll-frame { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 8px; }
.scroll-frame svg { min-width: 640px; }
.assumptions { font-size: .92rem; color: var(--text); }
.assumptions h3 { font-size: 1rem; margin-bottom: 4px; }
.assumptions ul { margin: 0 0 12px; }
.closing { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; font-size: .95rem; }
.tool-cta { margin-top: 16px; padding: 16px; background: var(--accent); color: var(--white); border-radius: var(--radius); }
.tool-cta a { color: var(--white); font-weight: 700; }
.tool-cta p { margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.seg label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px;
  border: 1px solid var(--outline); border-radius: var(--radius); background: var(--bg); cursor: pointer; font-weight: 600;
}
.seg input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.seg label:has(input:checked) { border: 2px solid var(--accent); background: var(--white); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
tfoot td, tfoot th { font-weight: 700; border-top: 2px solid var(--text); }
.rules { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
@media (min-width: 1000px) { .rules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rule { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.rule h3 { margin-bottom: 4px; }
.rule .sentence { font-family: var(--font-head); font-size: 1.05rem; line-height: 1.45; background: var(--surface); border-left: 4px solid var(--accent); padding: 10px 12px; margin: 12px 0; }
.rule .check { font-size: .9rem; color: var(--muted); margin: 0; }
.rule .rule-error { color: var(--error); font-weight: 600; border: 2px solid var(--error); border-radius: var(--radius); padding: 12px; }
.member { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg); display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); min-width: 0; margin: 0; }
.member legend { font-weight: 700; padding: 0 4px; }
@media (min-width: 600px) { .member { grid-template-columns: repeat(3, minmax(0, 1fr)); } .member .rm { grid-column: 1 / -1; justify-self: start; } }
.members { display: grid; gap: 10px; }
.plan-lines { padding-left: 1.3em; }
.plan-lines li { margin-bottom: 8px; }
.plan-lines .overlap { display: block; font-size: .9rem; color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .grow { animation: grow .4s ease-out both; transform-origin: left center; }
  @keyframes grow { from { transform: scaleX(.2); opacity: .3; } to { transform: scaleX(1); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Footer */
.site-footer { background: var(--surface); margin-top: 0; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); padding-block: 40px 24px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.footer-grid img { height: 56px; width: auto; border-radius: var(--radius); margin-bottom: 12px; }
.foot-h { font: 700 1rem var(--font-body); margin-bottom: 8px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); }
.footer-grid li a:hover { color: var(--primary); }
.footer-grid .tagline { font-size: 1.1rem; }
.foot-bottom { border-top: 1px solid var(--line); padding-block: 16px 24px; font-size: .92rem; }
.foot-bottom p { margin: 0; }
