/* TravelBudget v3.1 — v3 + mobile overflow fixes (seen in screenshots). */
:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --ink: #1b2f3a;
  --muted: #5c6e79;
  --line: #e4dcc9;
  --brand: #d95f33;
  --brand-dark: #b64a24;
  --brand-soft: #fbe9dd;
  --ocean: #0f5f86;
  --ocean-deep: #0b3347;
  --sky: #e9f2f5;
  --sky-soft: #f0f6f8;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(27, 47, 58, .09);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--ocean); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; min-width: 0; }

/* ---------- header (white, airy) ---------- */
.site-header { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 26px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--ocean-deep); text-decoration: none; white-space: nowrap; font-family: Georgia, "Times New Roman", serif; font-size: 21px; flex: 0 0 auto; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; font-family: var(--font); flex: 0 0 auto; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 9px; white-space: nowrap; }
.nav a:hover { color: var(--ocean-deep); background: var(--sky); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #dcebf2 0%, #f2eee1 70%, var(--bg) 100%); padding: 60px 0 10px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 44px; align-items: center; }
.hero-grid > div { min-width: 0; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.1; margin: 18px 0 14px; letter-spacing: -.025em; font-weight: 800; color: var(--ocean-deep); overflow-wrap: break-word; }
.lead { font-size: 19px; color: #40525d; margin: 0 0 20px; max-width: 50ch; }
.badges { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.badges i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 7px; }
.btn { display: inline-block; background: var(--brand); color: #fff !important; font-weight: 800; text-decoration: none; padding: 14px 30px; border-radius: 999px; border: 0; cursor: pointer; font-size: 16.5px; box-shadow: 0 8px 20px rgba(217, 95, 51, .32); font-family: inherit; max-width: 100%; }
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; color: #fff !important; border: 1.5px solid #7fd1c0; box-shadow: none; }
.btn.small { padding: 10px 20px; font-size: 15px; }

/* hero visual: straight ticket */
.hero-visual { min-width: 0; }
.ticket { background: #fff; border-radius: 18px; box-shadow: 0 18px 44px rgba(11, 51, 71, .16); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.tk-top { background: var(--ocean-deep); color: #fff; padding: 11px 20px; font-weight: 800; font-size: 13px; letter-spacing: .12em; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tk-top span:last-child { color: #ffd9a8; }
.tk-main { padding: 22px 24px 8px; min-width: 0; }
.tk-big { font-size: clamp(30px, 8vw, 44px); font-weight: 800; letter-spacing: -.02em; color: var(--ocean-deep); overflow-wrap: break-word; }
.tk-sub { color: var(--muted); font-size: 14.5px; margin: 2px 0 12px; }
.tk-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.tk-rows b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk-perf { height: 2px; margin: 12px 18px 0; border-top: 2px dashed var(--line); }
.tk-stub { display: flex; align-items: center; gap: 14px; padding: 12px 22px 18px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; color: var(--ocean-deep); flex-wrap: wrap; }
.tk-barcode { flex: 0 0 96px; height: 30px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 10px); border-radius: 3px; }
.chat-float { margin: 16px auto -26px; position: relative; z-index: 2; background: #fff; color: var(--ocean-deep); border: 1px solid var(--line); border-radius: 999px; padding: 10px 22px; font-size: 14.5px; font-weight: 700; max-width: max-content; box-shadow: var(--shadow); }

/* ---------- tool card ---------- */
.tool { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--ocean); border-radius: 18px; box-shadow: var(--shadow); padding: 30px 30px 26px; margin: 36px 0 8px; min-width: 0; }
.tool h2 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.02em; color: var(--ocean-deep); }
.tool .sub { color: var(--muted); margin: 0 0 20px; font-size: 15.5px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid > div { min-width: 0; }
.fld { display: block; font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; }
input[type="number"], select {
  width: 100%; font: inherit; font-size: 16.5px; padding: 13px 14px; border-radius: 12px;
  border: 1.5px solid #d8cfb8; background: #fffefa; color: var(--ink); min-width: 0; max-width: 100%;
}
input:focus, select:focus, button:focus-visible { outline: 3px solid rgba(217, 95, 51, .28); border-color: var(--brand); }
.result { background: var(--ocean-deep); color: #cfe0e8; border-radius: 14px; padding: 20px 22px; margin-top: 20px; min-width: 0; }
.result .big { font-size: clamp(26px, 7vw, 34px); font-weight: 800; color: #fff; letter-spacing: -.02em; overflow-wrap: break-word; }
.result .sub2 { font-size: 14.5px; margin-top: 2px; }
.result .bars { margin-top: 12px; }
.result .bar { background: #23485c; }
.result .bar span { background: #f0a35e; }
.result .bar-row .v { color: #cfe0e8; }
.result-foot { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }
.bar { height: 10px; border-radius: 6px; background: #ece4d2; overflow: hidden; margin: 8px 0 4px; }
.bar span { display: block; height: 100%; background: var(--ocean); border-radius: 6px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 64px; gap: 8px; align-items: center; font-size: 13.5px; }
.bar-row .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- sections ---------- */
.section { padding: 52px 0; overflow: hidden; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head h2, .section h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.02em; color: var(--ocean-deep); }
.section-head p, .section > .wrap > p { color: var(--muted); margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.card { background: var(--sky-soft); border: 1px solid #d8e5ea; border-radius: 18px; padding: 26px; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 8px; font-size: 20px; color: var(--ocean-deep); }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; overflow-wrap: break-word; }
/* steps: 3-column row on desktop */
.steps { counter-reset: st; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 66px 24px 26px; min-width: 0; }
.step::before { counter-increment: st; content: counter(st); position: absolute; left: 24px; top: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--ocean-deep); color: #fff; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0 0 8px; font-size: 19px; color: var(--ocean-deep); }
.step p { margin: 0; color: var(--muted); font-size: 15px; overflow-wrap: break-word; }
table.tbl { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15.5px; background: #fff; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--ocean); color: #fff; font-size: 13.5px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tbl th:first-child { border-radius: 12px 0 0 0; }
.tbl th:last-child { border-radius: 0 12px 0 0; }
.tbl td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.guides-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.guide-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px 24px 24px 28px; text-decoration: none; color: inherit; position: relative; min-width: 0; }
.guide-card::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 5px; border-radius: 4px; background: var(--brand); }
.guide-card:hover { box-shadow: var(--shadow); }
.guide-card h3 { margin: 0 0 8px; font-size: 20px; color: var(--ocean-deep); }
.guide-card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; min-width: 0; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 17px; color: var(--ocean-deep); }
.faq details p { color: var(--muted); margin: 10px 0 2px; overflow-wrap: break-word; }

/* article pages */
.article { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 42px 46px; margin: 34px 0; box-shadow: var(--shadow); min-width: 0; }
.article h1 { font-size: clamp(30px, 4.2vw, 44px); margin-top: 0; color: var(--ocean-deep); }
.article h2 { font-size: 25px; margin: 34px 0 10px; color: var(--ocean-deep); }
.article p, .article li { color: #33404d; overflow-wrap: break-word; }
.article .lead { font-size: 20px; color: var(--muted); }
.note { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; padding: 14px 18px; }
.note code { overflow-wrap: break-word; }
.src { font-size: 13.5px; color: var(--muted); }
.crumb { font-size: 14.5px; color: var(--muted); margin: 26px 0 0; }
.crumb a { text-decoration: none; }
code { overflow-wrap: break-word; }

/* ad slots (hidden automatically when no keys are configured) */
.ad-slot { max-width: 1060px; margin: 26px auto; padding: 0 22px; text-align: center; }
.ad-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9aa5ad; margin-bottom: 6px; }
.ad-in { display: flex; justify-content: center; min-width: 0; }
.ad-in iframe { max-width: 100%; }
/* desktop side rails */
.rail { display: none; position: fixed; top: 110px; z-index: 40; max-height: calc(100vh - 130px); overflow: hidden; }
.rail .ad-slot { margin: 0; padding: 0; }
@media (min-width: 1500px) { .rail { display: block; } .rail-l { left: calc(50% - 530px - 24px); transform: translateX(-100%); } .rail-r { right: calc(50% - 530px - 24px); } }

/* footer */
.site-footer { background: var(--ocean-deep); color: #c3ccd6; margin-top: 40px; border-top: 4px solid var(--brand); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 44px 0 10px; }
.site-footer .logo { color: #fff; }
.site-footer h4 { color: #ffd9a8; margin: 0 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c3ccd6; text-decoration: none; font-size: 15.5px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.disclaimer { font-size: 13.5px; color: #8d97a3; border-top: 1px solid #23485c; margin-top: 26px; padding-top: 20px; }
.fine { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0 26px; font-size: 14px; color: #8d97a3; }

/* error page */
.error-box { text-align: center; padding: 90px 0; }
.error-box h1 { font-size: 90px; margin: 0; color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; }
  .tool { padding: 20px 16px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .cards, .guides-grid, .steps { grid-template-columns: 1fr; }
  .step { padding: 20px 22px 20px 66px; }
  .step::before { left: 20px; top: 20px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .article { padding: 26px 20px; }
  .nav a { padding: 8px 8px; font-size: 14px; }
  table.tbl { display: block; overflow-x: auto; }
  table.tbl thead, table.tbl tbody { display: table; width: 100%; min-width: 620px; }
}
