@import url("fonts/faces.css");

/* ============================================================
   ITINERA — design tokens
   Flat black surfaces, hairline rules, one warm accent.
   No gradients anywhere: photography carries the richness.
   ============================================================ */
:root {
  --ink-000: #000000;
  --ink-050: #08080a;
  --ink-100: #101013;
  --ink-150: #17171b;
  --ink-200: #1e1e24;
  --ink-250: #26262e;

  --line: #2a2a33;
  --line-soft: #1f1f26;
  --line-strong: #3d3d48;

  --text: #f4f4f2;
  --text-2: #a3a3ab;
  --text-3: #8a8a95;

  --amber: #e8a33d;
  --amber-dim: #8a6021;
  --amber-ink: #171003;
  --amber-wash: rgba(232, 163, 61, 0.09);

  --green: #56d38a;
  --green-wash: rgba(86, 211, 138, 0.1);
  --red: #f0736b;
  --red-wash: rgba(240, 115, 107, 0.1);
  --blue: #7fb4e8;
  --blue-wash: rgba(127, 180, 232, 0.1);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 20px;
  --measure: 880px;
  --radius: 3px;
  --radius-lg: 5px;

  --header-h: 56px;

  /* controles nativos (date picker, scrollbars) en oscuro */
  color-scheme: dark;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink-050);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* height:auto es obligatorio: los atributos width/height del HTML fijan ambas
   dimensiones y, sin esto, aspect-ratio queda ignorado. */
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--amber); color: var(--amber-ink); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { border-top: 1px solid var(--line-soft); }

.stack > * + * { margin-top: var(--gap, 16px); }

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- type ---------- */
.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}

.eyebrow .dot { color: var(--amber); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: -0.022em;
}

.display em {
  font-style: italic;
  color: var(--amber);
}

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }

.lede {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  max-width: 46ch;
}

.small { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0; }
.micro { font-size: 11.5px; line-height: 1.5; color: var(--text-3); margin: 0; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   header
   ============================================================ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(8, 8, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.hdr-in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.brand-mark {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

@media (max-width: 420px) { .brand-sub { display: none; } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  background: var(--ink-100);
}

.pill .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.pill[data-state="on"] { color: var(--green); border-color: rgba(86, 211, 138, 0.35); background: var(--green-wash); }
.pill[data-state="on"] .led { background: var(--green); }
.pill[data-state="demo"] { color: var(--blue); border-color: rgba(127, 180, 232, 0.35); background: var(--blue-wash); }
.pill[data-state="demo"] .led { background: var(--blue); }
.pill[data-state="busy"] { color: var(--amber); border-color: var(--amber-dim); background: var(--amber-wash); }
.pill[data-state="busy"] .led { background: var(--amber); animation: blink 1s steps(2, start) infinite; }

@keyframes blink { 50% { opacity: 0.25; } }

/* ============================================================
   hero
   ============================================================ */
.hero { position: relative; }

.hero-img {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-100);
}

.hero-img img { width: 100%; height: 100%; object-fit: cover; }

.hero-tag {
  position: absolute;
  left: var(--gutter);
  bottom: 14px;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 9px;
  border-radius: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-copy {
  background: var(--ink-000);
  padding-block: 30px 34px;
  border-bottom: 1px solid var(--line-soft);
}

.hero-copy .display { margin-block: 14px 16px; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  margin-top: 26px;
  background: var(--ink-100);
}

.stat { padding: 13px 12px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: none; }

.stat-v {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.stat-l {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 6px;
  line-height: 1.35;
}

@media (max-width: 400px) {
  .stat { padding: 11px 8px; }
  .stat-v { font-size: 23px; }
  .stat-l { font-size: 9.5px; letter-spacing: 0.04em; }
}

@media (min-width: 860px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero-img { aspect-ratio: auto; min-height: 620px; }
  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 48px 56px max(var(--gutter), calc((100vw - var(--measure)) / 2));
    border-bottom: none;
    border-right: 1px solid var(--line-soft);
  }
  .hero-img { order: 2; }
  .hero-copy { order: 1; }
  /* en desktop el padding lo pone .hero-copy, no el wrap interno */
  .hero-wrap { padding-inline: 0; max-width: none; }
}

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--ink-150);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.008em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-align: center;
}

.btn:hover:not(:disabled) { background: var(--ink-250); border-color: var(--line-strong); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: #f2b155; border-color: #f2b155; }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); background: var(--ink-100); }

.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 15px; padding: 0 26px; }

.btn .sp {
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   sections + cards
   ============================================================ */
.sect { padding-block: 44px; }
.sect-head { margin-bottom: 22px; }
.sect-head .h2 { margin-top: 10px; }
.sect-head .lede { margin-top: 12px; }

.card {
  background: var(--ink-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.card + .card { margin-top: 14px; }

.card-quiet { background: var(--ink-050); }

.note {
  border: 1px solid var(--amber-dim);
  background: var(--amber-wash);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e9cfa4;
}

.note strong { color: var(--amber); font-weight: 600; }

.note-info { border-color: rgba(127, 180, 232, 0.32); background: var(--blue-wash); color: #c3dcf3; }
.note-info strong { color: var(--blue); }

/* ---------- step chrome ---------- */
.step { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-100); overflow: hidden; }
.step + .step { margin-top: 14px; }

.step-hd {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.step-n {
  flex: none;
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  margin-top: 1px;
}

.step[data-done="1"] .step-n {
  background: var(--green);
  border-color: var(--green);
  color: #04150b;
}

.step-bd { padding: 18px; }

.step-title { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; }
.step-desc { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* ---------- dropzone ---------- */
.drop {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--ink-050);
  padding: 26px 18px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  display: block;
  width: 100%;
}

.drop:hover, .drop.over { border-color: var(--amber); background: var(--amber-wash); }

.drop-ic { color: var(--text-3); margin-bottom: 8px; }
.drop.over .drop-ic, .drop:hover .drop-ic { color: var(--amber); }
.drop-t { font-size: 13.5px; font-weight: 500; }
.drop-s { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.files { list-style: none; margin: 12px 0 0; padding: 0; }
.files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-150);
  font-size: 12.5px;
}
.files li + li { margin-top: 7px; }
.files .fname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fsize { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 11.5px; flex: none; }
.files .fx { color: var(--text-3); flex: none; line-height: 1; padding: 2px; }
.files .fx:hover { color: var(--red); }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 14px; }

.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 7px;
}

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  background: var(--ink-200);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s ease;
}

.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--amber); outline: none; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a8a95' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.textarea { min-height: 76px; resize: vertical; line-height: 1.5; }

.input-key { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .field + .field { margin-top: 0; }

@media (min-width: 620px) {
  .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .grid-3 .field + .field { margin-top: 0; }
}

/* segmented control */
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button {
  flex: 1 1 0;
  min-height: 40px;
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  border-right: 1px solid var(--line);
  transition: background 0.13s ease, color 0.13s ease;
  white-space: nowrap;
}
.seg button:last-child { border-right: none; }
.seg button:hover { color: var(--text-2); background: var(--ink-150); }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--amber-ink); font-weight: 600; }

.seg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg-wrap::-webkit-scrollbar { display: none; }
.seg-wrap .seg { width: max-content; min-width: 100%; }
.seg-wrap .seg button { flex: 0 0 auto; padding: 0 14px; }

/* con espacio suficiente los segmentos reparten el ancho en partes iguales */
@media (min-width: 720px) {
  .seg-wrap .seg { width: 100%; }
  .seg-wrap .seg button { flex: 1 1 0; }
}

/* stepper */
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-200);
  overflow: hidden;
}
.stepper button {
  width: 42px;
  min-height: 44px;
  color: var(--text-2);
  font-size: 18px;
  line-height: 1;
  flex: none;
}
.stepper button:hover { background: var(--ink-250); color: var(--text); }
.stepper .v {
  flex: 1 1 auto;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-inline: 1px solid var(--line);
  min-height: 44px;
  display: grid;
  place-items: center;
}

/* range */
.range { width: 100%; appearance: none; height: 34px; background: none; }
.range::-webkit-slider-runnable-track { height: 3px; background: var(--line-strong); border-radius: 2px; }
.range::-moz-range-track { height: 3px; background: var(--line-strong); border-radius: 2px; }
.range::-webkit-slider-thumb {
  appearance: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid var(--ink-050);
  margin-top: -7px;
}
.range::-moz-range-thumb {
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--amber);
  border: 3px solid var(--ink-050);
}

/* ---------- picture picker (destinations / activities) ---------- */
.picker {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46%;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.picker::-webkit-scrollbar { display: none; }

@media (min-width: 620px) {
  .picker {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    grid-auto-columns: auto;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

.pic {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-150);
  scroll-snap-align: start;
  text-align: left;
  transition: border-color 0.15s ease;
  display: block;
}

.pic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0.66;
  transition: opacity 0.2s ease;
}

.pic:hover img { opacity: 0.86; }
.pic[aria-pressed="true"] { border-color: var(--amber); }
.pic[aria-pressed="true"] img { opacity: 1; }

.pic-cap {
  display: block;
  padding: 9px 10px 10px;
  background: var(--ink-100);
  border-top: 1px solid var(--line-soft);
}

.pic-t { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.pic-s { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }

.pic-check {
  position: absolute;
  top: 7px; right: 7px;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  color: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pic[aria-pressed="true"] .pic-check {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}

/* ---------- data tables ---------- */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
.tw::-webkit-scrollbar { height: 8px; }
.tw::-webkit-scrollbar-track { background: var(--ink-050); }
.tw::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 520px; }

table.t th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 9px 12px;
  background: var(--ink-150);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

table.t td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--text-2);
}

table.t tbody tr:last-child td { border-bottom: none; }
table.t tbody tr:hover td { background: var(--ink-150); }
table.t td.strongc { color: var(--text); font-weight: 500; }
table.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tfoot td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  color: var(--text);
  background: var(--ink-150);
}

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
  white-space: nowrap;
}

.tag-alojamiento { color: var(--amber); border-color: var(--amber-dim); background: var(--amber-wash); }
.tag-traslados { color: var(--blue); border-color: rgba(127, 180, 232, 0.3); background: var(--blue-wash); }
.tag-tours { color: var(--green); border-color: rgba(86, 211, 138, 0.3); background: var(--green-wash); }
.tag-comidas { color: #d79ce8; border-color: rgba(215, 156, 232, 0.3); background: rgba(215, 156, 232, 0.1); }
.tag-otros { color: var(--text-2); }

/* ---------- run log ---------- */
.log {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-000);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  max-height: 210px;
  overflow-y: auto;
}

.log-l { display: flex; gap: 9px; color: var(--text-3); }
.log-l .ic { flex: none; width: 12px; text-align: center; }
.log-l[data-k="ok"] { color: var(--green); }
.log-l[data-k="run"] { color: var(--amber); }
.log-l[data-k="err"] { color: var(--red); }
.log-l[data-k="info"] { color: var(--text-2); }

/* ---------- results ---------- */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(86, 211, 138, 0.32);
  background: var(--green-wash);
  border-radius: var(--radius);
  padding: 13px 15px;
}

.verdict .ic { color: var(--green); flex: none; margin-top: 1px; }
.verdict-t { font-size: 13px; font-weight: 600; color: var(--green); }
.verdict-s { font-size: 12px; color: #9fd9ba; margin-top: 3px; line-height: 1.5; }

.verdict[data-ok="0"] { border-color: rgba(240, 115, 107, 0.32); background: var(--red-wash); }
.verdict[data-ok="0"] .ic, .verdict[data-ok="0"] .verdict-t { color: var(--red); }
.verdict[data-ok="0"] .verdict-s { color: #edb1ad; }

.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.13s ease;
}

.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--amber); }

@media (max-width: 430px) {
  .tabs button { padding: 11px 10px; font-size: 12.5px; }
}

.panel { padding-top: 20px; }
.panel[hidden] { display: none; }

/* El desglose interno tiene 8 columnas y no entra en la medida editorial:
   a partir de 1100px el bloque de resultado gana ancho propio. */
@media (min-width: 1100px) {
  #result > .wrap { max-width: 1140px; }
}

#panel-interno table.t { min-width: 760px; }
#panel-interno table.t td:nth-child(2) { min-width: 190px; }
#panel-interno table.t td:last-child { min-width: 170px; }

/* price block */
.price {
  border: 1px solid var(--line);
  background: var(--ink-000);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.price-rows { display: grid; gap: 9px; }
.price-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--text-2); }
.price-row .v { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }

.price-total {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.price-total .k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

.price-big {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 11vw, 3.4rem);
  line-height: 0.92;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.price-cur { font-size: 0.42em; color: var(--text-3); margin-left: 6px; letter-spacing: 0.04em; }
.price-pp { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.price-pp b { color: var(--text); font-weight: 600; }

/* itinerary */
.days { display: grid; gap: 12px; }

.day {
  display: grid;
  grid-template-columns: 84px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-100);
}

.day-img { background: var(--ink-200); }
.day-img img { width: 100%; height: 100%; object-fit: cover; min-height: 100%; }
.day-bd { padding: 13px 14px; min-width: 0; }
.day-n { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.day-t { font-size: 14px; font-weight: 600; margin-top: 4px; letter-spacing: -0.012em; }
.day-d { font-size: 12.5px; color: var(--text-2); margin-top: 5px; line-height: 1.5; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.chip {
  font-size: 10.5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-3);
  background: var(--ink-150);
}

@media (min-width: 620px) { .day { grid-template-columns: 132px 1fr; } }

/* include / exclude lists */
.lists { display: grid; gap: 14px; }
@media (min-width: 620px) { .lists { grid-template-columns: 1fr 1fr; } }

.ilist { list-style: none; margin: 8px 0 0; padding: 0; }
.ilist li {
  position: relative;
  padding-left: 19px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.ilist li + li { margin-top: 6px; }
.ilist li::before {
  content: "";
  position: absolute;
  left: 3px; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.ilist[data-neg="1"] li::before { background: var(--red); border-radius: 0; height: 1px; width: 7px; left: 2px; top: 10px; }

/* downloads */
.dls { display: grid; gap: 10px; }
@media (min-width: 620px) { .dls { grid-template-columns: repeat(3, 1fr); } }

.dl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-150);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}

.dl:hover:not(:disabled) { border-color: var(--line-strong); background: var(--ink-200); }
.dl:disabled { opacity: 0.4; cursor: not-allowed; }

.dl-ic {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  border: 1px solid currentColor;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dl-ic[data-t="docx"] { color: var(--blue); background: var(--blue-wash); }
.dl-ic[data-t="pdf"] { color: var(--red); background: var(--red-wash); }
.dl-ic[data-t="xlsx"] { color: var(--green); background: var(--green-wash); }

.dl > span:last-child { display: block; min-width: 0; }
.dl-t { display: block; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.dl-s { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ============================================================
   chat
   ============================================================ */
.chat {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-100);
  overflow: hidden;
}

.chat-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-150);
}

.chat-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  flex: none;
}

.chat-log {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
  max-height: 460px;
  overflow-y: auto;
}

.msg { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.55; }
.msg .who {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
  margin-top: 1px;
}

.msg[data-r="assistant"] .who { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.msg .bubble { min-width: 0; color: var(--text-2); }
.msg[data-r="user"] .bubble { color: var(--text); }
.msg .bubble p { margin: 0; }
.msg .bubble p + p { margin-top: 8px; }
.msg .bubble ul { margin: 8px 0 0; padding-left: 18px; }
.msg .bubble li { margin-bottom: 4px; }
.msg .bubble strong { color: var(--text); font-weight: 600; }
.msg .bubble code { font-family: var(--mono); font-size: 12px; background: var(--ink-200); padding: 1px 5px; border-radius: 2px; color: var(--amber); }

.msg-tool {
  border: 1px solid var(--amber-dim);
  background: var(--amber-wash);
  border-radius: var(--radius);
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 11px;
  color: #e9cfa4;
  margin-top: 8px;
  line-height: 1.6;
}

.chat-sug { display: flex; gap: 7px; padding: 0 16px 12px; flex-wrap: wrap; }

.sug {
  font-size: 11.5px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-2);
  background: var(--ink-150);
  transition: border-color 0.13s ease, color 0.13s ease;
}
.sug:hover { border-color: var(--amber); color: var(--amber); }

.chat-in { display: flex; gap: 9px; padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--ink-050); }
.chat-in .input { min-height: 42px; }
.chat-in .btn { flex: none; padding: 0 15px; min-height: 42px; }

.typing { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); animation: bob 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.16s; }
.typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes bob { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ============================================================
   architecture / footer
   ============================================================ */
.arch { background: var(--ink-000); }
.arch svg { width: 100%; height: auto; display: block; }

.arch-grid { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 620px) { .arch-grid { grid-template-columns: repeat(3, 1fr); } }

.arch-c { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--ink-100); }
.arch-c .k { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); font-weight: 600; }
.arch-c .t { font-size: 13.5px; font-weight: 600; margin-top: 6px; letter-spacing: -0.012em; }
.arch-c .d { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

.ftr { border-top: 1px solid var(--line-soft); padding-block: 26px 40px; background: var(--ink-000); }

/* ============================================================
   utility
   ============================================================ */
[hidden] { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skel {
  background: var(--ink-200);
  border-radius: 2px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink-200);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.toast[data-k="err"] { border-color: var(--red); color: #f5b5b1; }
.toast[data-k="ok"] { border-color: var(--green); color: #a7e0c2; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* tramos sucesivos dentro de una misma respuesta del agente */
.msg .bubble .say + .say,
.msg .bubble .say + .msg-tool,
.msg .bubble .msg-tool + .say { margin-top: 8px; }
