/* Delivery Tracker — sitio. Mismos tokens que la extensión. */
@font-face { font-family: "Bebas Neue"; src: url("fonts/BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --brand-50: #F2F8FF; --brand-100: #DFEEFF; --brand-200: #BFDCFF; --brand-600: #145FC0; --brand-700: #114B98; --brand-900: #0B2547;
  --ink: #0B0F14; --text: #1F2937; --text-secondary: #4B5563; --border: #E5E7EB;
  --surface-page: #F7F9FC; --surface-card: #FFFFFF; --on-action: #FFFFFF;
  --st-pending-bg: #F3F4F6; --st-pending-fg: #4B5563; --st-transit-bg: #DFEEFF; --st-transit-fg: #114B98;
  --st-out-bg: #FEF3C7; --st-out-fg: #B45309; --st-delivered-bg: #DCFCE7; --st-delivered-fg: #15803D;
  --danger: #B91C1C; --ok: #15803D;
  --radius-md: 8px; --radius-lg: 12px; --radius-xl: 20px;
  --display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(11, 15, 20, .06), 0 8px 24px rgba(11, 15, 20, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-50: #0E1A2E; --brand-100: #0B2547; --brand-200: #10396F; --brand-600: #8EC1FF; --brand-700: #BFDCFF;
    --ink: #F3F6FA; --text: #E5E7EB; --text-secondary: #9CA3AF; --border: #1F2937;
    --surface-page: #0B0F14; --surface-card: #111827; --on-action: #0B0F14;
    --st-pending-bg: #1F2937; --st-pending-fg: #D1D5DB; --st-transit-bg: #10304F; --st-transit-fg: #BFDCFF;
    --st-out-bg: #422006; --st-out-fg: #FCD34D; --st-delivered-bg: #052E16; --st-delivered-fg: #86EFAC;
    --danger: #FCA5A5; --ok: #86EFAC;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

body.dtw-page { margin: 0; background: var(--surface-page); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
.dtw-page *, .dtw-page *::before, .dtw-page *::after { box-sizing: border-box; }
.dtw-page a { color: var(--brand-600); }
.dtw-page img { max-width: 100%; }
.dtw-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.dtw-narrow { max-width: 760px; }
.dtw-skip { position: absolute; left: -9999px; }
.dtw-skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface-card); padding: 8px 12px; border-radius: var(--radius-md); }
.dtw-display { font-family: var(--display); font-weight: 400; letter-spacing: .5px; color: var(--ink); line-height: 1; margin: 0; }
.dtw-muted { color: var(--text-secondary); font-size: 14px; }

/* Botones */
.dtw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--radius-md); font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s, transform .05s; }
.dtw-btn:active { transform: translateY(1px); }
.dtw-btn:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; }
.dtw-page a.dtw-btn-primary, .dtw-btn-primary { background: var(--brand-600); color: var(--on-action); }
.dtw-btn-primary:hover { background: var(--brand-700); }
.dtw-page a.dtw-btn-ghost, .dtw-btn-ghost { background: var(--surface-card); color: var(--ink); border-color: var(--ink); }
.dtw-btn-ghost:hover { background: var(--brand-50); }
.dtw-btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.dtw-btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.dtw-btn-block { width: 100%; }
.dtw-btn.is-disabled, .dtw-btn:disabled { opacity: .55; cursor: default; pointer-events: none; }
.dtw-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Encabezado y pie */
.dtw-header { background: var(--brand-100); border-bottom: 1px solid var(--brand-200); position: sticky; top: 0; z-index: 5; }
.dtw-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.dtw-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dtw-page .dtw-brand span, .dtw-footer-brand span { font-family: var(--display); font-size: 28px; letter-spacing: .6px; color: var(--ink); padding-top: 3px; }
.dtw-nav { display: flex; align-items: center; gap: 20px; }
.dtw-page .dtw-nav a:not(.dtw-btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.dtw-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.dtw-footer { margin-top: 64px;
}
.dtw-p-home .dtw-footer { margin-top: 0; }
.dtw-footer { border-top: 1px solid var(--border); background: var(--surface-card); }
.dtw-footer-in { display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: center; padding: 32px 24px; }
.dtw-footer-brand { display: flex; align-items: center; gap: 8px; }
.dtw-footer-brand span { font-size: 22px; }
.dtw-footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.dtw-page .dtw-footer-nav a { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.dtw-copy { grid-column: 1 / -1; margin: 0; color: var(--text-secondary); font-size: 13px; }

.dtw-main { min-height: 50vh; }
.dtw-page-head { padding-top: 48px; padding-bottom: 8px; }
.dtw-page-head .dtw-display { font-size: clamp(40px, 6vw, 56px); }
.dtw-content > :not(.dtw-wrap):not(section):not(div) { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 24px; }

/* Portada */
.dtw-hero { background: linear-gradient(180deg, var(--brand-100), var(--surface-page)); padding: 56px 0 72px; }
.dtw-hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.dtw-eyebrow { margin: 0 0 12px; font-weight: 600; color: var(--brand-700); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; }
.dtw-hero-title { font-size: clamp(52px, 8vw, 88px); margin-bottom: 20px; }
.dtw-lead { font-size: 19px; color: var(--text); margin: 0 0 28px; max-width: 34em; }
.dtw-mock { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; max-width: 400px; margin-left: auto; }
.dtw-mock-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--brand-100); font-family: var(--display); font-size: 20px; letter-spacing: .5px; color: var(--ink); }
.dtw-mock-group { display: flex; align-items: center; gap: 6px; padding: 8px 16px 4px; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.dtw-mock-group b { margin-left: auto; font-weight: 500; }
.dtw-mock-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.dtw-mock-row strong { display: block; font-size: 14px; color: var(--ink); }
.dtw-mock-row strong span { color: var(--text-secondary); font-size: 12px; }
.dtw-mock-row small { display: block; font-size: 13px; color: var(--text); }
.dtw-mock-row em { display: block; font-style: normal; font-size: 12px; color: var(--brand-600); font-weight: 600; }
.dtw-pill { align-self: flex-start; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.st-pending { background: var(--st-pending-bg); color: var(--st-pending-fg); }
.st-transit { background: var(--st-transit-bg); color: var(--st-transit-fg); }
.st-out { background: var(--st-out-bg); color: var(--st-out-fg); }
.st-delivered { background: var(--st-delivered-bg); color: var(--st-delivered-fg); }
i.d-ae, i.d-ml, i.d-amz, i.d-man { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
i.d-ae { background: #E43225; } i.d-ml { background: #FFD100; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); } i.d-amz { background: #FF9900; } i.d-man { background: var(--brand-600); }

.dtw-section { padding: 72px 0; }
.dtw-section-alt { background: var(--surface-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dtw-h2 { font-size: clamp(38px, 5vw, 52px); margin-bottom: 32px; }
.dtw-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dtw-steps li { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.dtw-steps h3 { margin: 12px 0 6px; font-size: 18px; color: var(--ink); }
.dtw-steps p { margin: 0; color: var(--text-secondary); }
.dtw-step-n { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-family: var(--display); font-size: 24px; padding-top: 3px; }
.dtw-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.dtw-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.dtw-sources li { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: baseline; }
.dtw-sources li i { transform: translateY(-1px); }
.dtw-sources strong { color: var(--ink); }
.dtw-sources span { grid-column: 2; color: var(--text-secondary); font-size: 15px; }
.dtw-privacy-card { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: var(--radius-lg); padding: 28px; }
.dtw-privacy-card h3 { margin: 0 0 8px; color: var(--ink); font-size: 20px; }
.dtw-privacy-card p { margin: 0 0 12px; }
.dtw-faq { border-bottom: 1px solid var(--border); padding: 16px 0; }
.dtw-faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.dtw-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand-600); }
.dtw-faq[open] summary::after { content: "–"; }
.dtw-faq p { margin: 10px 0 0; color: var(--text-secondary); }
.dtw-cta { background: var(--brand-100); text-align: center; }
.dtw-cta-in { display: grid; justify-items: center; gap: 24px; }
.dtw-cta .dtw-display { font-size: clamp(40px, 6vw, 60px); }

/* Planes */
.dtw-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.dtw-plan { position: relative; display: flex; flex-direction: column; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.dtw-plan.is-popular { border: 2px solid var(--brand-600); box-shadow: var(--shadow); }
.dtw-plan-badge { position: absolute; top: -12px; left: 24px; background: var(--brand-600); color: var(--on-action); font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.dtw-plan-name { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: .5px; color: var(--ink); }
.dtw-plan-blurb { margin: 4px 0 16px; color: var(--text-secondary); font-size: 14px; min-height: 2.8em; }
.dtw-plan-price { margin: 0 0 16px; display: flex; flex-direction: column; }
.dtw-plan-price strong { font-size: 36px; line-height: 1.1; color: var(--ink); }
.dtw-plan-price span { color: var(--text-secondary); font-size: 14px; }
.dtw-plan-feats { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; align-content: start; font-size: 14px; flex: 1; }
.dtw-plan-feats li { padding-left: 22px; position: relative; }
.dtw-plan-feats li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--brand-600); border-bottom: 2px solid var(--brand-600); transform: rotate(-45deg); }
.dtw-note { margin: 20px 0 0; color: var(--text-secondary); font-size: 14px; text-align: center; }
.dtw-p-pricing .dtw-content > .dtw-plans, .dtw-p-pricing .dtw-content > .dtw-note { max-width: 1120px; padding: 0 24px; margin-left: auto; margin-right: auto; }

/* Textos legales */
.dtw-legal { padding-top: 8px; }
.dtw-legal h2 { font-size: 20px; color: var(--ink); margin: 32px 0 8px; }
.dtw-legal ul { padding-left: 20px; }
.dtw-legal li { margin-bottom: 6px; }
.dtw-draft { background: var(--st-out-bg); color: var(--st-out-fg); border-radius: var(--radius-md); padding: 12px 16px; margin: 0 0 16px; font-size: 14px; }

/* Mi cuenta */
.dtw-account { max-width: 760px; margin: 0 auto; padding: 8px 24px 0; display: grid; gap: 20px; }
.dtw-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.dtw-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--ink); }
.dtw-card h2 + p { margin-top: 0; }
.dtw-card p { margin: 0 0 12px; }
.dtw-card .dtw-actions { margin-top: 16px; }
.dtw-field { display: grid; gap: 6px; margin: 16px 0; }
.dtw-field label { font-weight: 600; font-size: 14px; color: var(--ink); }
.dtw-field input, .dtw-field select { font: 16px var(--sans); color: var(--ink); background: var(--surface-card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; min-height: 44px; width: 100%; }
.dtw-field input:focus, .dtw-field select:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.dtw-code { letter-spacing: 8px; font-size: 24px !important; text-align: center; font-variant-numeric: tabular-nums; }
.dtw-err { color: var(--danger); font-size: 14px; min-height: 1.4em; margin: 4px 0 0; }
.dtw-banner { border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; }
.dtw-banner.ok { background: var(--st-delivered-bg); color: var(--st-delivered-fg); }
.dtw-banner.info { background: var(--brand-100); color: var(--brand-700); }
.dtw-banner.warn { background: var(--st-out-bg); color: var(--st-out-fg); }
.dtw-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: 15px; }
.dtw-kv dt { color: var(--text-secondary); }
.dtw-kv dd { margin: 0; color: var(--ink); }
.dtw-planhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dtw-planhead .dtw-display { font-size: 40px; }
.dtw-choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.dtw-choice { text-align: left; background: var(--surface-card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px; cursor: pointer; font: inherit; color: var(--text); }
.dtw-choice:hover { border-color: var(--brand-600); }
.dtw-choice.is-selected { border: 2px solid var(--brand-600); background: var(--brand-50); }
.dtw-choice strong { display: block; color: var(--ink); font-size: 16px; }
.dtw-choice span { display: block; font-size: 14px; color: var(--text-secondary); }
.dtw-list { list-style: none; margin: 12px 0 0; padding: 0; }
.dtw-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.dtw-list li > div { min-width: 0; }
.dtw-list strong { display: block; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.dtw-list span { display: block; color: var(--text-secondary); font-size: 14px; }
.dtw-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); margin-left: 6px; vertical-align: 1px; }
.dtw-inline { display: flex; gap: 8px; align-items: flex-end; }
.dtw-inline .dtw-field { flex: 1; margin: 0; }
.dtw-link { background: none; border: 0; padding: 0; color: var(--brand-600); font: inherit; cursor: pointer; text-decoration: underline; }

@media (max-width: 960px) {
  .dtw-plans { grid-template-columns: repeat(2, 1fr); }
  .dtw-hero-in, .dtw-split { grid-template-columns: 1fr; }
  .dtw-mock { margin: 0 auto; }
}
@media (max-width: 640px) {
  .dtw-wrap { padding: 0 16px; }
  .dtw-nav a:not(.dtw-btn) { display: none; }
  .dtw-nav a[href*="cuenta"] { display: inline; }
  .dtw-page .dtw-brand span { font-size: 22px; }
  .dtw-steps, .dtw-plans { grid-template-columns: 1fr; }
  .dtw-section { padding: 48px 0; }
  .dtw-footer-in { grid-template-columns: 1fr; }
  .dtw-footer-nav { justify-content: flex-start; }
  .dtw-inline { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .dtw-btn { transition: none; } }
@media (max-width: 640px) { .dtw-nav .dtw-btn { display: none; } }
