/* ===================================================================
   Búzios Sunsets — application styles
   =================================================================== */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.62;
  color: var(--text);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ocean); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--surface); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.15em; }

/* ---- brand mark: a little sun over water ---- */
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, var(--gold-soft), var(--coral) 62%),
    var(--grad-sunset);
  box-shadow: 0 0 0 3px rgba(239,95,56,.16), 0 3px 10px rgba(239,95,56,.35);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: 22%; height: 2px;
  background: rgba(255,255,255,.75); border-radius: 2px;
  box-shadow: 0 4px 0 rgba(255,255,255,.5);
}

/* ===================================================================
   Top bar (pinned)
   =================================================================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); z-index: 50;
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--grad-rule);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: .3px; color: var(--ocean-deep);
}
.brand-sub {
  font-size: 10.5px; letter-spacing: .5px; color: var(--text-mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang-opt {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px; border-radius: 6px; line-height: 0;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.lang-flag { width: 26px; height: 17px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang-opt:hover { background: var(--surface-3); }
.lang-opt.on { border-color: var(--ocean); background: var(--surface-3); box-shadow: var(--shadow-sm); }
.lang-opt.on .lang-flag { box-shadow: 0 0 0 1px rgba(0,0,0,.35); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; color: var(--text-soft);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none;
  transition: color .15s, border-color .15s, transform .15s;
}
.btn-ghost:hover { color: var(--coral); border-color: var(--coral-soft); transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ocean-deep); cursor: pointer;
}

/* ===================================================================
   Layout + side nav
   =================================================================== */
.layout { padding-top: var(--topbar-h); }

.sidenav {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--nav-w);
  border-right: 1px solid var(--line); background: var(--surface-2);
  overflow-y: auto; padding: 20px 14px; display: flex; flex-direction: column;
}
.nav-list { list-style: none; margin: 0; padding: 0; counter-reset: nav; flex: 1; }
.nav-list li { margin: 2px 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 14px;
  border-left: 3px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.nav-ic {
  display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--surface); border: 1px solid var(--line); color: var(--ocean-brt);
  flex: none; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-3); color: var(--ocean-deep); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(239,95,56,.10), rgba(239,95,56,0));
  border-left-color: var(--coral); color: var(--ocean-deep);
}
.nav-item.active .nav-ic { background: var(--grad-sunset); color: #fff; border-color: transparent; }
.nav-foot { padding: 14px 12px 6px; font-size: 11px; color: var(--text-mut); border-top: 1px solid var(--line); margin-top: 10px; }

/* ===================================================================
   Content column
   =================================================================== */
.content {
  margin-left: var(--nav-w); height: calc(100vh - var(--topbar-h));
  overflow-y: auto; scroll-behavior: smooth; outline: none;
}
.content:focus-visible { box-shadow: none; }
.doc { max-width: var(--maxw); margin: 0 auto; padding: 0 34px 90px; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden; margin: 26px 0 8px;
  border-radius: var(--radius); background: var(--grad-hero); color: #fff;
  padding: 46px 44px 40px; box-shadow: var(--shadow);
}
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero-eyebrow {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700;
  color: var(--gold-soft);
}
.hero-title {
  font-family: var(--font-display); font-weight: 400; font-size: 42px; line-height: 1.1;
  margin: 12px 0 14px; text-shadow: 0 2px 20px rgba(0,0,0,.22);
}
.hero-title em { font-style: normal; font-weight: 700; color: var(--gold-soft); }
.hero-sub { font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.92); margin: 0 0 20px; }
.hero-hint { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(3px);
}
.hero-sun {
  position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(245,196,99,.9), rgba(239,95,56,.4) 55%, transparent 72%);
  z-index: 1; filter: blur(2px);
}

/* ---- section ---- */
.doc-section { padding: 40px 0 8px; scroll-margin-top: 20px; border-top: 1px solid var(--line); margin-top: 26px; }
.doc-section:first-of-type { border-top: none; margin-top: 8px; }
.sec-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.sec-num {
  font-family: var(--font-display); font-size: 19px; font-weight: 700; color: #fff;
  width: 46px; height: 46px; flex: none; border-radius: 13px; display: flex; align-items: center;
  justify-content: center; background: var(--grad-ocean); box-shadow: var(--shadow-sm);
}
.sec-title { font-family: var(--font-display); font-weight: 700; font-size: 29px; color: var(--ocean-deep); margin: 2px 0 0; line-height: 1.15; }
.sec-rule { display: block; width: 54px; height: 3px; border-radius: 2px; background: var(--grad-sunset); margin: 12px 0; }
.sec-headline { font-size: 16.5px; color: var(--coral); font-weight: 600; margin: 0; line-height: 1.4; }
.sec-summary { font-size: 16px; color: var(--text); margin: 4px 0 22px; }
.sec-summary strong { color: var(--ocean-deep); }

/* ===================================================================
   Blocks
   =================================================================== */
.blk-h { font-family: var(--font-display); font-size: 20px; color: var(--ocean-deep); margin: 26px 0 10px; }
.blk-lead { color: var(--text-soft); margin: 0 0 14px; }
.prose p { margin: 0 0 12px; }

/* ---- pills ---- */
.pill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 13px; margin: 8px 0 6px; }
.pill {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 16px 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 2px; overflow: hidden; font: inherit; color: inherit;
}
.pill::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-ocean); }
.pill-k { font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--text-mut); font-weight: 700; min-height: 2.4em; }
.pill-v { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ocean-deep); line-height: 1.1; }
.pill-u { font-size: 11.5px; color: var(--text-soft); }
.pop-mark {
  position: absolute; right: 12px; bottom: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--coral); background: rgba(239,95,56,.09); border: 1px solid var(--coral-soft);
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.pop-mark .ic { width: 14px; height: 14px; }
.pill.is-pop { cursor: pointer; padding-bottom: 40px; transition: transform .16s, box-shadow .16s, border-color .16s; }
.pill.is-pop:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--coral-soft); }
.pill.is-pop:hover .pop-mark, .ecard.is-pop:hover .pop-mark { color: #fff; background: var(--coral); border-color: var(--coral); transform: translateY(-1px); }
.pill-good::before { background: linear-gradient(90deg, var(--good), #7fd0a6); }
.pill-good .pill-v { color: var(--good); }
.pill-warn::before { background: var(--grad-sunset); }
.pill-warn .pill-v { color: var(--warn); }
.pill-bad::before { background: linear-gradient(90deg, var(--bad), var(--coral)); }
.pill-bad .pill-v { color: var(--bad); }
.pill-accent::before { background: var(--grad-sunset); }
.pill-accent .pill-v { color: var(--coral); }

/* ---- cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 15px; margin: 8px 0; }
.ecard {
  position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius-sm); padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm); font: inherit; color: inherit;
}
.ecard-h { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-size: 17px; color: var(--ocean-deep); margin: 0 0 8px; font-weight: 700; }
.ecard-n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--grad-ocean); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ecard-i { color: var(--coral); display: inline-flex; }
.ecard p { margin: 0; font-size: 14px; color: var(--text-soft); }
.ecard.is-pop { cursor: pointer; padding-bottom: 44px; transition: transform .16s, box-shadow .16s, border-color .16s; }
.ecard.is-pop:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-left-color: var(--coral); }
.ecard.is-pop p, .pill.is-pop .pill-u { padding-right: 24px; }

/* ---- callout ---- */
.callout {
  display: flex; gap: 14px; border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0;
  border: 1px solid var(--line); border-left: 5px solid var(--coral); background: var(--surface-2);
}
.callout h4 { margin: 0 0 5px; font-family: var(--font-display); font-size: 16px; color: var(--ocean-deep); }
.callout p { margin: 0; color: var(--text); }
.callout-accent { border-left-color: var(--coral); background: linear-gradient(100deg, rgba(239,95,56,.07), var(--surface-2) 60%); }
.callout-info   { border-left-color: var(--teal);  background: linear-gradient(100deg, rgba(20,167,159,.08), var(--surface-2) 60%); }
.callout-warn   { border-left-color: var(--gold);  background: linear-gradient(100deg, rgba(237,165,49,.11), var(--surface-2) 60%); }

/* ---- figures / images ---- */
.fig {
  display: block; width: 100%; text-align: left; padding: 0; margin: 18px 0; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); font: inherit; color: inherit;
}
.fig-img { display: block; }
.fig-img img { display: block; width: 100%; height: auto; }
.fig-cap { display: block; padding: 11px 16px; font-size: 13px; color: var(--text-soft); background: var(--surface-2); }
.fig.is-pop { cursor: pointer; transition: transform .18s, box-shadow .18s; }
.fig.is-pop:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fig.is-pop:hover .fig-cap { color: var(--coral); }
.fig-more {
  display: inline-flex; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%;
  vertical-align: -0.25em; align-items: center; justify-content: center;
  color: var(--coral); background: rgba(239,95,56,.09); border: 1px solid var(--coral-soft);
}
.fig-more .ic { width: 12px; height: 12px; }

/* ---- pull quote ---- */
.pull { margin: 20px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--ocean-deep); }

/* ===================================================================
   Tables
   =================================================================== */
.tbl-wrap { margin: 16px 0 20px; }
.tbl-title { font-family: var(--font-display); font-size: 16px; color: var(--ocean-deep); margin: 0 0 8px; font-weight: 700; }
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); min-width: 460px; }
.tbl thead th {
  background: var(--grad-ocean); color: #fff; font-weight: 600; text-align: left; padding: 11px 14px;
  position: sticky; top: 0; white-space: nowrap; font-size: 12.5px; letter-spacing: .3px;
}
.tbl tbody td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:nth-child(even) td { background: var(--surface-2); }
.tbl tbody tr:hover td { background: rgba(31,136,167,.07); }
.ta-left { text-align: left; } .ta-right { text-align: right; } .ta-center { text-align: center; }
.tbl td.ta-right, .tbl th.ta-right { font-variant-numeric: tabular-nums; }
.val-compact, .th-short { display: none; }
.emp-strong { font-weight: 700; color: var(--ocean-deep); }
.emp-good { font-weight: 700; color: var(--good); }
.emp-warn { font-weight: 700; color: var(--warn); }
.emp-bad  { font-weight: 700; color: var(--bad); }
.tbl-note { font-size: 12.5px; color: var(--text-mut); margin: 8px 2px 0; }

.cell-pop {
  font: inherit; color: var(--coral); background: none; border: none; padding: 0; cursor: pointer;
  border-bottom: 1px dotted var(--coral-soft); text-align: inherit;
}
.cell-pop::after {
  content: "i"; display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 5px; border-radius: 50%;
  font-size: 10px; line-height: 1; font-weight: 700; font-family: var(--font-body);
  color: var(--coral); border: 1px solid var(--coral-soft); background: rgba(239,95,56,.08);
  vertical-align: 0.08em;
}
.cell-pop:hover { color: var(--ocean); border-bottom-style: solid; }

/* ===================================================================
   Inline interactive text
   =================================================================== */
.gloss { border-bottom: 1px dashed var(--ocean-brt); cursor: help; color: inherit; }
.gloss:hover { color: var(--ocean); }
a.pop, .pop {
  color: var(--coral); text-decoration: none; border-bottom: 1px solid rgba(239,95,56,.4);
  cursor: pointer; font-weight: 600;
}
a.pop:hover, .pop:hover { color: var(--ocean); border-bottom-color: var(--ocean); }
.muted { color: var(--text-mut); font-size: 13.5px; }

/* ===================================================================
   Pop-up panels (nested)
   =================================================================== */
.popup-root { position: fixed; inset: 0; z-index: 60; display: none; }
.popup-root.open { display: block; }
.popup-backdrop {
  position: fixed; inset: 0; background: rgba(34,26,48,.52); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s;
}
.popup-root.open .popup-backdrop { opacity: 1; }
.popup-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%);
  width: min(720px, calc(100vw - 40px)); max-height: min(86vh, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; opacity: 0; transition: opacity .2s, transform .2s;
}
.popup-panel.in { opacity: 1; transform: translate(-50%, -50%); }
.popup-article { display: flex; flex-direction: column; max-height: inherit; min-height: 0; }
.popup-head {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface); flex: none;
}
.popup-head::after { content: ""; }
.popup-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--coral); font-weight: 700; }
.popup-title { font-family: var(--font-display); font-size: 22px; color: var(--ocean-deep); margin: 2px 0 0; line-height: 1.2; }
.popup-head-txt { flex: 1; min-width: 0; }
.popup-close {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-soft); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: color .15s, background .15s, transform .15s;
}
.popup-close:hover { color: #fff; background: var(--coral); transform: rotate(90deg); }
.popup-body {
  padding: 18px 22px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.popup-body > *:first-child { margin-top: 0; }
.popup-body p { margin: 0 0 12px; }
.popup-body ul { margin: 0 0 12px; padding-left: 20px; }
.popup-body li { margin: 4px 0; }
.popup-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-rule); z-index: 1;
}

/* gallery inside popups */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.gallery-solo { grid-template-columns: 1fr; }
.gitem { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gthumb {
  display: block; width: 100%; padding: 0; border: 0; background: #0d2536; cursor: zoom-in;
  font: inherit; color: inherit; overflow: hidden;
}
.gitem img { display: block; width: 100%; height: 130px; object-fit: cover; transition: transform .18s, filter .18s; }
.gthumb:hover img, .gthumb:focus-visible img { transform: scale(1.035); filter: saturate(1.08); }
.gallery-solo .gitem img { height: auto; max-height: 360px; object-fit: contain; background: #0d2536; }
.gitem figcaption { padding: 7px 10px; font-size: 12px; color: var(--text-soft); }

/* full-viewport image carousel */
.lightbox-root { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(10,22,34,.82); backdrop-filter: blur(4px); }
.lightbox {
  position: relative; width: min(80vw, 1200px); height: min(80vh, 820px);
  display: grid; grid-template-rows: 1fr auto; gap: 12px;
}
.lightbox-stage {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 0; border-radius: var(--radius); overflow: hidden; background: #081927;
  box-shadow: var(--shadow-lg);
}
.lightbox-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-meta { color: #fff; text-align: center; font-size: 13px; line-height: 1.45; }
.lightbox-caption { display: block; color: rgba(255,255,255,.86); }
.lightbox-count { display: block; color: rgba(255,255,255,.62); font-weight: 700; letter-spacing: .4px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; z-index: 2; border: 1px solid rgba(255,255,255,.32); color: #fff;
  background: rgba(13,37,54,.68); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; font-size: 25px; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; width: 44px; height: 58px; margin-top: -29px; border-radius: 999px; font-size: 34px; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(239,95,56,.9); transform: translateY(-1px); }

/* ===================================================================
   Tooltip
   =================================================================== */
.tooltip {
  position: fixed; z-index: 90; max-width: 280px; background: var(--night); color: #fff;
  font-size: 13px; line-height: 1.5; padding: 9px 12px; border-radius: 10px; box-shadow: var(--shadow);
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .13s, transform .13s;
}
.tooltip.show { opacity: 1; transform: translateY(0); }
.tooltip::after {
  content: ""; position: absolute; left: var(--arrow-x, 50%); bottom: -6px; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--night); border-bottom: 0;
}
.tooltip.below::after { bottom: auto; top: -6px; border-top: 0; border-bottom-color: var(--night); }

/* ===================================================================
   Buttons / login
   =================================================================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad-sunset); color: #fff; border: none; border-radius: 11px;
  padding: 12px 22px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.login-body {
  min-height: 100vh; margin: 0; display: grid; place-items: start center; overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 18%, rgba(245,196,99,.68), transparent 18rem),
    radial-gradient(circle at 12% 82%, rgba(20,167,159,.44), transparent 20rem),
    linear-gradient(135deg, rgba(11,59,92,.98), rgba(21,94,131,.86) 38%, rgba(239,95,56,.94));
  padding: clamp(18px, 4vw, 46px);
}
.login-body::before,
.login-body::after {
  content: ""; position: fixed; pointer-events: none; z-index: 0;
}
.login-body::before {
  inset: auto -10% -22% -10%; height: 46vh; opacity: .33;
  background:
    radial-gradient(120% 72% at 50% 0%, rgba(255,255,255,.82), transparent 48%),
    repeating-radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.42) 0 2px, transparent 2px 18px);
}
.login-body::after {
  width: 48vmin; height: 48vmin; top: -13vmin; left: -12vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,196,99,.58), rgba(244,131,94,.26) 45%, transparent 70%);
}
.login-experience {
  width: min(1220px, 100%); min-height: min(780px, calc(100vh - 56px)); display: grid;
  grid-template-columns: minmax(340px, .95fr) minmax(360px, 1.05fr); gap: clamp(16px, 4vw, 48px);
  align-items: center; position: relative; z-index: 1;
}
.login-story {
  position: relative; overflow: hidden; border-radius: 30px; padding: clamp(26px, 3vw, 38px);
  background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.66);
  box-shadow: var(--shadow-lg); backdrop-filter: saturate(1.35) blur(16px);
}
.login-story::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: var(--grad-rule);
}
.login-story::after {
  content: "✦"; position: absolute; right: 26px; top: 22px; color: var(--gold); font-size: 34px;
  text-shadow: 0 4px 16px rgba(237,165,49,.42);
}
.login-kicker {
  margin: 0 0 10px; color: var(--coral); text-transform: uppercase; letter-spacing: 1.8px;
  font-size: 12px; font-weight: 800;
}
.login-logo { width: min(294px, 82%); height: auto; margin: 0 0 18px; display: block; }
.login-title {
  font-family: var(--font-display); font-size: clamp(37px, 3.25vw, 48px); line-height: .98;
  color: var(--ocean-deep); margin: 0 0 18px; letter-spacing: -.8px;
}
.login-sub { font-size: 16px; color: var(--text-soft); margin: 0 0 24px; max-width: 54ch; }
.login-proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 22px; }
.login-proof {
  min-height: 90px; border: 1px solid var(--line); border-radius: 18px; padding: 13px 12px;
  background: linear-gradient(160deg, var(--surface), var(--surface-3)); box-shadow: var(--shadow-sm);
}
.proof-num {
  display: block; font-family: var(--font-display); font-size: 29px; line-height: 1; color: var(--ocean);
  font-weight: 700; margin-bottom: 8px;
}
.proof-label { display: block; font-size: 12px; line-height: 1.35; color: var(--text-soft); font-weight: 700; }
.login-form {
  text-align: left; display: grid; gap: 12px; background: rgba(251,247,239,.88);
  border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm);
}
.login-label { display: block; font-size: 12px; font-weight: 800; color: var(--ocean-deep); text-transform: uppercase; letter-spacing: .9px; margin-bottom: 7px; }
.login-input {
  width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--surface-2); transition: border-color .15s, box-shadow .15s;
}
.login-input:focus { outline: none; border-color: var(--ocean-brt); box-shadow: var(--ring); }
.login-btn { width: 100%; min-height: 48px; }
.login-err { color: var(--bad); font-size: 13px; margin: 12px 0 0; }
.login-collage {
  position: relative; min-height: 650px; filter: drop-shadow(0 34px 40px rgba(11,59,92,.26));
}
.login-sunburst {
  position: absolute; width: 245px; height: 245px; right: 7%; top: 8%; border-radius: 50%;
  background:
    repeating-conic-gradient(from 8deg, rgba(245,196,99,.92) 0 10deg, rgba(244,131,94,.72) 10deg 20deg),
    var(--grad-sunset);
  opacity: .72; box-shadow: 0 0 70px rgba(245,196,99,.62); animation: loginFloat 7s ease-in-out infinite;
}
.login-photo {
  position: absolute; margin: 0; overflow: hidden; border-radius: 26px; border: 8px solid rgba(255,255,255,.9);
  background: var(--surface); box-shadow: var(--shadow-lg); isolation: isolate;
}
.login-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(11,59,92,.42));
}
.login-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.login-swap-img {
  position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; will-change: opacity;
}
.login-photo figcaption {
  position: absolute; left: 14px; bottom: 14px; z-index: 3; max-width: calc(100% - 28px);
  padding: 6px 12px; border-radius: 999px; background: rgba(11,59,92,.78); color: #fff;
  font-size: 12px; line-height: 1.2; font-weight: 800; letter-spacing: .2px; backdrop-filter: blur(8px);
}
.login-photo-main { width: 72%; height: 342px; left: 9%; top: 96px; transform: rotate(-3.8deg); z-index: 3; }
.login-photo-beach { width: 44%; height: 205px; left: 0; top: 360px; transform: rotate(5deg); z-index: 4; }
.login-photo-dining { width: 43%; height: 238px; right: 0; top: 28px; transform: rotate(6deg); z-index: 5; }
.login-photo-rental { width: 37%; height: 195px; right: 8%; bottom: 60px; transform: rotate(-6deg); z-index: 6; }
.login-photo-cove { width: 34%; height: 172px; left: 42%; bottom: 8px; transform: rotate(7deg); z-index: 2; }
.login-badge {
  position: absolute; left: 5%; top: 38px; z-index: 7; max-width: 190px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 18px; color: var(--ocean-deep); background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.72); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.25; font-weight: 800;
}
.badge-star {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--grad-sunset); color: #fff; box-shadow: 0 8px 20px rgba(239,95,56,.32);
}

@keyframes loginFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(12px) rotate(5deg); }
}

/* ===================================================================
   Filterable explorers (competitors + menu)
   =================================================================== */
.explorer { margin: 14px 0 8px; }
.exp-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.exp-search {
  display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px;
  padding: 9px 13px; color: var(--text-mut); transition: border-color .15s, box-shadow .15s;
}
.exp-search:focus-within { border-color: var(--ocean-brt); box-shadow: var(--ring); color: var(--ocean); }
.exp-search input { border: none; background: none; font: inherit; width: 100%; color: var(--text); outline: none; }
.exp-count { font-size: 12.5px; font-weight: 700; color: var(--text-mut); white-space: nowrap; }

.exp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.exp-chips-wrap { max-height: 116px; overflow-y: auto; padding: 2px; }
.chip-f {
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.chip-f:hover { border-color: var(--coral-soft); color: var(--coral); transform: translateY(-1px); }
.chip-f.is-on { background: var(--grad-ocean); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.chip-div { width: 1px; height: 20px; background: var(--line-2); margin: 0 3px; }

.exp-scroll { max-height: 62vh; overflow-y: auto; }
.exp-scroll-tall { max-height: 56vh; }
.exp-table thead th { position: sticky; top: 0; z-index: 2; }
.exp-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.exp-table th.sortable::after { content: " \2195"; opacity: .5; font-size: 11px; }
.exp-table th.asc::after { content: " \2191"; opacity: 1; }
.exp-table th.desc::after { content: " \2193"; opacity: 1; }

.cx-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cx-name { font-weight: 600; color: var(--ocean-deep); }
button.cx-name { font: inherit; font-weight: 600; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
button.cx-name:hover { color: var(--coral); text-decoration: underline; }
.cx-ed { display: block; font-size: 12px; color: var(--text-mut); margin-top: 3px; max-width: 52ch; }
.bdg { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 5px; color: #fff; }
.bdg .ic { width: 12px; height: 12px; }
.bdg-view { background: var(--ocean-brt); }
.bdg-hotel { background: var(--gold); }
.bdg-music { background: var(--coral); }

/* competitor detail panel */
.popup-title .bdg { vertical-align: middle; margin-left: 6px; }
.cx-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }
.cx-flag {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--ocean); border: 1px solid var(--line);
}
.cx-editorial { font-size: 14px; color: var(--text-soft); }
.cx-menu { font-size: 13.5px; color: var(--text-soft); }
.cx-analysis { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.cx-web a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--coral); }
.cx-web .ic { width: 14px; height: 14px; }

/* ===================================================================
   Fund table + fund detail panel
   =================================================================== */
.fund-table td { font-size: 13.5px; }
.fund-table .cell-pop { font-weight: 600; }

.fund-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 2px 0 18px;
}
.fst {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; display: flex; flex-direction: column; gap: 3px;
}
.fst-k { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-mut); font-weight: 700; }
.fst-v { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ocean-deep); }
.fst-v.pos { color: var(--good); }
.fst-v.neg { color: var(--bad); }

.fund-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 14px; font-size: 14px; }
.fund-dl dt { font-weight: 700; color: var(--ocean-deep); white-space: nowrap; }
.fund-dl dd { margin: 0; color: var(--text-soft); }

/* ===================================================================
   Menu explorer
   =================================================================== */
.popup-panel-wide { width: min(1060px, calc(100vw - 40px)); }
.menu-table td { font-size: 13.5px; }
.mtag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-3); color: var(--ocean); white-space: nowrap;
}
.mi-name { font-weight: 600; color: var(--ocean-deep); }
.mi-desc { display: block; font-size: 12px; color: var(--text-mut); margin-top: 2px; max-width: 44ch; }
.mi-price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--coral); white-space: nowrap; }
.cx-venue { color: var(--text-soft); font-size: 13px; }
.popup-body-flush { padding: 14px 18px 18px; }

/* ===================================================================
   Focus visibility
   =================================================================== */
:focus-visible { outline: 2px solid var(--ocean-brt); outline-offset: 2px; border-radius: 4px; }
.pill.is-pop:focus-visible, .ecard.is-pop:focus-visible, .fig.is-pop:focus-visible { box-shadow: var(--ring); }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .topbar-tools { margin-left: 0; }
  .sidenav {
    transform: translateX(-100%); transition: transform .2s; z-index: 45; box-shadow: var(--shadow);
    width: 82%; max-width: var(--nav-w);
  }
  .sidenav.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .doc { padding: 0 18px 70px; }
  .hero { padding: 34px 26px; }
  .hero-title { font-size: 32px; }
  .sec-title { font-size: 24px; }
  .lightbox-root { padding: 12px; }
  .lightbox { width: calc(100vw - 24px); height: 80vh; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 760px) {
  .login-experience { min-height: 0; grid-template-columns: 1fr; }
  .login-story { max-width: 740px; margin: 0 auto; }
  .login-collage { min-height: 560px; max-width: 760px; width: 100%; margin: 0 auto; }
}

@media (max-width: 700px) {
  .login-body { padding: 14px; }
  .login-story { border-radius: 24px; padding: 28px 20px 22px; }
  .login-proof-grid { grid-template-columns: 1fr; }
  .login-proof { min-height: 0; display: flex; align-items: center; gap: 12px; }
  .proof-num { margin: 0; min-width: 54px; }
  .login-collage { min-height: 500px; }
  .login-photo-main { width: 86%; height: 260px; left: 6%; top: 82px; }
  .login-photo-beach { width: 49%; height: 172px; top: 302px; }
  .login-photo-dining { width: 48%; height: 178px; right: 0; top: 10px; }
  .login-photo-rental { width: 45%; height: 158px; right: 4%; bottom: 18px; }
  .login-photo-cove { width: 40%; height: 136px; left: 35%; bottom: 0; }
}

@media (max-width: 520px) {
  .login-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; filter: none; }
  .login-sunburst, .login-badge { display: none; }
  .login-photo {
    position: relative; inset: auto; width: auto; height: 145px; transform: none; border-width: 5px; border-radius: 18px;
  }
  .login-photo-main { grid-column: 1 / -1; height: 208px; }
  .login-photo figcaption { font-size: 11px; left: 8px; bottom: 8px; padding: 5px 9px; }
}

@media (max-width: 520px) {
  .tbl { min-width: 0; font-size: 11.4px; line-height: 1.25; }
  .tbl thead th {
    padding: 7px 5px; white-space: normal; font-size: 10.2px; line-height: 1.12; letter-spacing: 0;
  }
  .tbl tbody td { padding: 7px 5px; }
  .tbl td.ta-right, .tbl th.ta-right { white-space: nowrap; }
  .tbl-title { font-size: 15px; }
  .tbl-note { font-size: 11.5px; line-height: 1.4; }
  .val-full, .th-full { display: none; }
  .val-compact, .th-short { display: inline; }
  .cell-pop { font-size: inherit; line-height: inherit; }
  .cell-pop::after { width: 12px; height: 12px; margin-left: 3px; font-size: 8px; }
  .fund-table { min-width: 620px; }
  .exp-table { min-width: 500px; }
  .menu-table { min-width: 540px; }
  .tbl-airbnb-headtohead { min-width: 600px; }
  .tbl .col-supports, .tbl .col-illus, .tbl .col-pro { overflow-wrap: anywhere; }
  .tbl-closest-competitors .col-name { width: 33%; }
  .tbl-true-competitors .col-role { width: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
