/* Italy <-> Slovenia Border Corridor — Haaparanta winning architecture + distinct Alpine-Adriatic Hero */
:root {
  --itsi-hero-a: #07202b;
  --itsi-hero-b: #0b3948;
  --itsi-hero-c: #134e5e;
  --itsi-accent: #10b981;
  --itsi-accent-soft: rgba(16, 185, 129, 0.16);
  --itsi-card-bg: rgba(15, 23, 42, 0.74);
  --itsi-border: rgba(148, 163, 184, 0.22);
}
html.fp-light {
  --itsi-hero-a: #e6f4f1;
  --itsi-hero-b: #d2ece8;
  --itsi-hero-c: #c3e3ea;
  --itsi-card-bg: rgba(255, 255, 255, 0.90);
  --itsi-border: rgba(15, 23, 42, 0.14);
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b1220;
  color: #f1f5f9;
  line-height: 1.5;
}
html.fp-light body { background: #f8fafc; color: #0f172a; }
.itsi-hdr {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(10, 18, 28, 0.88);
  border-bottom: 1px solid var(--itsi-border);
}
html.fp-light .itsi-hdr { background: rgba(248, 251, 252, 0.92); }
.itsi-hdr-in {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.itsi-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; text-decoration: none; color: inherit; letter-spacing: -0.01em; }
.itsi-brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, #38bdf8, #10b981); display: inline-block; }
.itsi-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.88rem; }
.itsi-nav a { color: inherit; opacity: 0.88; text-decoration: none; padding: 5px 9px; border-radius: 8px; }
.itsi-nav a:hover { opacity: 1; background: rgba(148, 163, 184, 0.15); }
.itsi-lang-pill { font-weight: 700; border: 1px solid var(--itsi-border); border-radius: 999px; padding: 5px 12px !important; }
.itsi-theme-btn {
  border: 1px solid var(--itsi-border); background: transparent; color: inherit;
  border-radius: 999px; padding: 5px 10px; cursor: pointer; font-size: 0.84rem;
}

/* DISTINCT ALPINE-ADRIATIC HERO */
.itsi-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 15% 10%, var(--itsi-hero-c) 0%, var(--itsi-hero-b) 48%, var(--itsi-hero-a) 100%);
  border-bottom: 1px solid var(--itsi-border);
  padding: 26px 20px 34px;
}
.itsi-hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: 0.34; }
html.fp-light .itsi-hero-bg { opacity: 0.24; }
.itsi-hero-bg svg { width: 100%; height: 100%; display: block; }
.itsi-hero-in { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; }
.itsi-crumb { font-size: 0.82rem; opacity: 0.82; margin: 0 0 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.itsi-crumb a { color: inherit; text-decoration: none; }
.itsi-crumb a:hover { text-decoration: underline; }
.itsi-hero-top {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr); gap: 20px; align-items: end; margin-bottom: 20px;
}
@media (max-width: 860px) { .itsi-hero-top { grid-template-columns: 1fr; } }
.itsi-badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.itsi-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700;
  padding: 4px 11px; border-radius: 999px;
  background: var(--itsi-accent-soft); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35);
}
html.fp-light .itsi-badge { color: #047857; background: rgba(16, 185, 129, 0.14); }
.itsi-badge-live { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.32); }
html.fp-light .itsi-badge-live { color: #0369a1; }
.itsi-hero h1 {
  margin: 0 0 10px; font-size: clamp(1.65rem, 3.2vw, 2.45rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 850;
}
.itsi-hero h1 .acc { color: #34d399; }
html.fp-light .itsi-hero h1 .acc { color: #059669; }
.itsi-lead { margin: 0 0 14px; font-size: 1rem; line-height: 1.5; opacity: 0.9; max-width: 64ch; }

/* Crossing selector pills */
.itsi-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.itsi-pill {
  appearance: none; border: 1px solid var(--itsi-border); background: var(--itsi-card-bg); color: inherit;
  border-radius: 999px; padding: 7px 13px; font-size: 0.84rem; font-weight: 650; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.itsi-pill:hover { transform: translateY(-1px); border-color: #34d399; }
.itsi-pill[aria-pressed="true"] { background: #10b981; color: #042f2e; border-color: #10b981; font-weight: 750; }

/* Instant savings callout box */
.itsi-delta-box {
  background: var(--itsi-card-bg); border: 1px solid var(--itsi-border); border-radius: 16px;
  padding: 16px 18px; backdrop-filter: blur(10px);
}
.itsi-delta-k { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.78; margin: 0 0 6px; font-weight: 700; }
.itsi-delta-val { font-size: clamp(1.5rem, 2.7vw, 2.0rem); font-weight: 850; color: #34d399; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
html.fp-light .itsi-delta-val { color: #059669; }
.itsi-delta-sub { margin: 0; font-size: 0.85rem; opacity: 0.88; line-height: 1.4; }

/* Haaparanta-style 3-column KPI + Calculator grid */
.itsi-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 920px) { .itsi-cards { grid-template-columns: 1fr; } }
.itsi-card {
  background: var(--itsi-card-bg); border: 1px solid var(--itsi-border); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.itsi-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.itsi-card-h b { font-size: 1.05rem; }
.itsi-card-h small { font-size: 0.76rem; opacity: 0.74; }
.itsi-pair-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.itsi-side { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--itsi-border); background: rgba(148, 163, 184, 0.07); }
.itsi-side.win { border-color: rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.12); }
.itsi-side-cc { font-size: 0.76rem; font-weight: 700; opacity: 0.82; display: block; margin-bottom: 3px; }
.itsi-side-p { font-size: 1.36rem; font-weight: 850; font-variant-numeric: tabular-nums; display: block; }
.itsi-side-n { font-size: 0.73rem; opacity: 0.74; }
.itsi-diff-line { font-size: 0.88rem; font-weight: 700; color: #34d399; margin: 0; }
html.fp-light .itsi-diff-line { color: #059669; }
.itsi-wob-line { font-size: 0.77rem; opacity: 0.76; border-top: 1px solid var(--itsi-border); padding-top: 8px; margin: 0; }

/* Calculator controls */
.itsi-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.itsi-seg button {
  flex: 1; min-width: 72px; border: 1px solid var(--itsi-border); background: transparent; color: inherit;
  border-radius: 10px; padding: 7px 8px; font-size: 0.82rem; font-weight: 700; cursor: pointer;
}
.itsi-seg button[aria-pressed="true"] { background: #10b981; color: #042f2e; border-color: #10b981; }
.itsi-row { display: flex; align-items: center; gap: 10px; }
.itsi-row label { font-size: 0.82rem; font-weight: 650; min-width: 82px; opacity: 0.86; }
.itsi-row input[type="range"] { flex: 1; accent-color: #10b981; }
.itsi-row input[type="number"] {
  width: 66px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--itsi-border);
  background: rgba(148, 163, 184, 0.1); color: inherit; font-weight: 700; text-align: right;
}
.itsi-out { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.32); border-radius: 12px; padding: 11px 13px; }
.itsi-out-r { display: flex; justify-content: space-between; font-size: 0.88rem; margin: 2px 0; font-variant-numeric: tabular-nums; }
.itsi-out-v { margin: 7px 0 0; font-size: 1.02rem; font-weight: 850; color: #34d399; font-variant-numeric: tabular-nums; }
html.fp-light .itsi-out-v { color: #047857; }
.itsi-fxn { margin: 14px 0 0; font-size: 0.78rem; opacity: 0.78; line-height: 1.45; }

/* Main sections */
.itsi-wrap { max-width: 1160px; margin: 0 auto; padding: 26px 20px 54px; }
.itsi-sec { margin-top: 30px; }
.itsi-eyb { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #34d399; margin: 0 0 6px; }
html.fp-light .itsi-eyb { color: #059669; }
.itsi-sec h2 { margin: 0 0 8px; font-size: clamp(1.3rem, 2.3vw, 1.72rem); letter-spacing: -0.02em; }
.itsi-sec .lead { margin: 0 0 16px; opacity: 0.84; max-width: 72ch; }

/* Dual-side station tables */
.itsi-st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
@media (max-width: 860px) { .itsi-st-grid { grid-template-columns: 1fr; } }
.itsi-st-box { border: 1px solid var(--itsi-border); border-radius: 16px; overflow: hidden; background: rgba(148, 163, 184, 0.05); }
.itsi-st-head { padding: 13px 16px; border-bottom: 1px solid var(--itsi-border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.itsi-st-head h3 { margin: 0; font-size: 1rem; }
.itsi-st-head a { font-size: 0.82rem; color: #38bdf8; text-decoration: none; font-weight: 650; }
html.fp-light .itsi-st-head a { color: #0284c7; }
.itsi-tbl { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.itsi-tbl th, .itsi-tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--itsi-border); }
.itsi-tbl th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.72; }
.itsi-tbl td.num, .itsi-tbl th.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.itsi-tbl tr:last-child td { border-bottom: none; }
.itsi-st-name { font-weight: 700; display: block; }
.itsi-st-sub { font-size: 0.76rem; opacity: 0.72; display: block; }
.itsi-panel[hidden] { display: none; }

/* Guide, FAQ, Links, Footer */
.itsi-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .itsi-tips { grid-template-columns: 1fr; } }
.itsi-tip { border: 1px solid var(--itsi-border); border-radius: 14px; padding: 16px; background: rgba(148, 163, 184, 0.05); }
.itsi-tip h3 { margin: 0 0 6px; font-size: 0.98rem; }
.itsi-tip p { margin: 0; font-size: 0.88rem; opacity: 0.86; line-height: 1.5; }
.itsi-faq details { border: 1px solid var(--itsi-border); border-radius: 12px; padding: 13px 16px; margin-bottom: 10px; background: rgba(148, 163, 184, 0.04); }
.itsi-faq summary { font-weight: 750; cursor: pointer; }
.itsi-faq p { margin: 10px 0 0; font-size: 0.9rem; opacity: 0.88; line-height: 1.55; }
.itsi-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.itsi-links a { border: 1px solid var(--itsi-border); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: inherit; font-size: 0.88rem; font-weight: 650; }
.itsi-links a:hover { border-color: #10b981; }
.itsi-ftr { border-top: 1px solid var(--itsi-border); padding: 22px 20px; text-align: center; font-size: 0.82rem; opacity: 0.76; }
.itsi-ftr a { color: inherit; }
