:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --paper: #ffffff;
  --paper-soft: #f9fafc;
  --ink: #172033;
  --muted: #6c7588;
  --line: #e5e9f1;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --blue-deep: #1949b8;
  --green: #158a62;
  --green-soft: #e8f7f1;
  --amber: #b86414;
  --amber-soft: #fff3df;
  --red: #c63b45;
  --red-soft: #fff0f1;
  --shadow: 0 18px 45px rgba(44, 58, 92, 0.08);
  --shadow-tight: 0 8px 24px rgba(44, 58, 92, 0.08);
  --radius: 22px;
  --radius-small: 14px;
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% -20%, rgba(37, 99, 235, 0.11), transparent 32rem),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid rgba(219, 225, 236, 0.85);
  background: rgba(250, 251, 253, 0.9);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: var(--blue);
  color: white;
  font-size: 21px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
  letter-spacing: -0.04em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 50px;
}

.nav-item {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #70798b;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  background: #f0f3f8;
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--paper);
  color: var(--blue);
  font-weight: 720;
  box-shadow: var(--shadow-tight);
}

.nav-item > span:first-child {
  font-size: 18px;
  font-weight: 500;
}

.nav-item b {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
}

.privacy-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.privacy-chip i,
.sync-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.sidebar-foot p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 0 42px 80px;
}

.topbar {
  display: flex;
  min-height: 124px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow,
.kicker {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 37px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.topbar h1 span {
  color: #a3acba;
  font-weight: 450;
}

.topbar-actions,
.button-row,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  font-size: 11px;
}

.avatar-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #172033;
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.global-error {
  margin: -4px 0 18px;
  padding: 13px 16px;
  border: 1px solid #f2c7ca;
  border-radius: 13px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
}

.view {
  display: none;
  animation: view-in 220ms ease both;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.advisory-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.advisory {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #f0d2a8;
  border-radius: 15px;
  background: var(--amber-soft);
}

.advisory.blocked {
  border-color: #f1c8cc;
  background: var(--red-soft);
}

.advisory-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: rgba(184, 100, 20, 0.12);
  color: var(--amber);
  font-size: 15px;
  font-weight: 900;
}

.advisory.blocked .advisory-icon {
  background: rgba(198, 59, 69, 0.12);
  color: var(--red);
}

.advisory strong,
.advisory p {
  display: block;
  margin: 0;
}

.advisory strong {
  font-size: 13px;
}

.advisory p {
  margin-top: 3px;
  color: #765b36;
  font-size: 11px;
  line-height: 1.45;
}

.advisory.blocked p {
  color: #7d4a50;
}

.advisory a {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 18px;
}

.card {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(225, 230, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.card.wide {
  grid-column: 1 / -1;
}

.card-head,
.panel-heading,
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card h2,
.section-intro h2,
.panel-heading h3,
.dialog-head h2,
.settings-card h3,
.local-data-card h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.card h2 {
  font-size: 19px;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.icon-button {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--blue-soft);
}

.route-line {
  display: grid;
  grid-template-columns: 12px 1fr 28px 1fr 12px;
  align-items: center;
  margin: 33px 8px 14px;
}

.route-dot {
  width: 11px;
  height: 11px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
}

.route-dot.destination {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green);
}

.route-track {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: #dce2ec;
}

.route-track i {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, transparent 50%, white 50%);
  background-size: 8px 2px;
}

.route-plane {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 12px;
  transform: rotate(8deg);
}

.route-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
}

.route-labels strong,
.route-labels span,
.route-labels small {
  display: block;
}

.route-labels strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.route-labels span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.align-right {
  text-align: right;
}

.route-duration {
  text-align: center;
}

.route-duration span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.route-duration small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.readiness-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.readiness-ring {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--progress), #e9edf4 0);
}

.readiness-ring::after {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: white;
  content: "";
}

.readiness-ring > div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.readiness-ring strong,
.readiness-ring span {
  display: block;
}

.readiness-ring strong {
  font-size: 26px;
  letter-spacing: -0.06em;
}

.readiness-ring span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.readiness-card h2 {
  margin-bottom: 5px;
}

.readiness-card p:not(.kicker) {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.subtle-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f3f8;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.pet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pet-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper-soft);
}

.pet-avatar {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border-radius: 18px;
  background: var(--blue-soft);
  font-size: 25px;
}

.pet-card.cat .pet-avatar {
  background: #f1eafe;
}

.pet-card strong,
.pet-card span,
.pet-card small {
  display: block;
}

.pet-card strong {
  font-size: 14px;
}

.pet-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.pet-card small {
  margin-top: 7px;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.pet-card small.warning {
  color: var(--amber);
}

.pet-edit {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  cursor: pointer;
}

.feasibility-card {
  border-left: 4px solid var(--amber);
}

.feasibility-card.blocked {
  border-left-color: var(--red);
}

.feasibility-card.ready {
  border-left-color: var(--green);
}

.feasibility-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px;
  font-weight: 850;
}

.feasibility-card.blocked .feasibility-chip {
  background: var(--red-soft);
  color: var(--red);
}

.feasibility-card.ready .feasibility-chip {
  background: var(--green-soft);
  color: var(--green);
}

.feasibility-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 24px;
  margin-top: 14px;
}

.feasibility-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.feasibility-body ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feasibility-body li {
  padding-left: 15px;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.45;
}

.feasibility-body li::before {
  float: left;
  margin-left: -15px;
  color: var(--amber);
  content: "•";
}

.feasibility-card.blocked .feasibility-body li::before { color: var(--red); }
.feasibility-card.ready .feasibility-body li::before { color: var(--green); }

.next-list {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.next-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.next-item:first-child {
  border-top: 0;
}

.next-index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 850;
}

.next-item strong,
.next-item span {
  display: block;
}

.next-item strong {
  font-size: 11px;
  line-height: 1.35;
}

.next-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.urgent {
  background: var(--red);
  box-shadow: 0 0 0 5px var(--red-soft);
}

.fare-empty,
.empty-state {
  display: grid;
  min-height: 148px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.fare-empty p,
.empty-state p {
  max-width: 260px;
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.big-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 20px;
}

.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 26px;
}

.section-intro h2 {
  font-size: clamp(27px, 3vw, 40px);
}

.section-intro p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.progress-copy {
  min-width: 115px;
  text-align: right;
}

.progress-copy strong,
.progress-copy span {
  display: block;
}

.progress-copy strong {
  font-size: 21px;
}

.progress-copy span {
  color: var(--muted);
  font-size: 10px;
}

.phase-filter {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.phase-filter button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.phase-filter button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.checklist-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 18px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  transition: 160ms ease;
}

.task-card:hover {
  border-color: #ccd7ed;
  box-shadow: var(--shadow-tight);
}

.task-card.done {
  opacity: 0.66;
}

.task-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1.5px solid #cdd4e1;
  border-radius: 11px;
  background: white;
  cursor: pointer;
  color: transparent;
  font-weight: 900;
}

.task-card.done .task-check {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.task-copy h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.task-copy > p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-meta span,
.task-meta a {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f1f3f7;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-decoration: none;
}

.task-meta .critical {
  background: var(--red-soft);
  color: var(--red);
}

.task-meta .overdue {
  background: var(--amber-soft);
  color: var(--amber);
}

.task-caution {
  margin-top: 8px;
  padding: 7px 9px;
  border-left: 2px solid var(--amber);
  background: var(--amber-soft);
  color: #765b36;
  font-size: 9px;
  line-height: 1.5;
}

.task-state-select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 9px;
}

.source-panel {
  position: sticky;
  top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-tight);
}

.source-panel h3 {
  margin: 0;
  font-size: 17px;
}

.source-panel > p:not(.kicker) {
  margin: 7px 0 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.source-list {
  display: grid;
  gap: 7px;
}

.source-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.source-link span:last-child {
  color: var(--blue);
}

.primary-button,
.secondary-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.2);
}

.primary-button:hover {
  background: var(--blue-deep);
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.secondary-button.compact {
  min-height: 33px;
  padding: 0 11px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.document-actions {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

.vault-panel {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-tight);
}

.vault-note {
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.document-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.document-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.document-type-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
}

.document-card h4 {
  overflow: hidden;
  margin: 9px 0 4px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-card p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.document-status {
  display: inline-block;
  margin-top: 9px;
  padding: 4px 6px;
  border-radius: 7px;
  background: #eff2f6;
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
}

.document-status.current {
  background: var(--green-soft);
  color: var(--green);
}

.document-status.expiring {
  background: var(--amber-soft);
  color: var(--amber);
}

.document-status.expired {
  background: var(--red-soft);
  color: var(--red);
}

.document-links {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.document-links a,
.document-links button,
.attach-document {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.document-links .delete-document {
  color: var(--red);
}

.attach-document {
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
}

.dialog-privacy {
  margin: 13px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--green-soft);
  color: #39745f;
  font-size: 9px;
  line-height: 1.45;
}

.provider-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.provider-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.provider-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.provider-card strong {
  font-size: 11px;
}

.provider-card p {
  min-height: 27px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.connection-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9c0cc;
}

.connection-pill.on {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 28px;
}

.panel-heading {
  align-items: end;
  margin-bottom: 12px;
}

.panel-heading h3 {
  font-size: 20px;
}

.watch-list,
.quote-list {
  display: grid;
  gap: 10px;
}

.watch-item,
.quote-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.watch-item-head,
.quote-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watch-item strong,
.quote-item strong {
  font-size: 12px;
}

.watch-route {
  margin-top: 8px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.watch-meta,
.quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.watch-meta span,
.quote-meta span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f2f4f8;
  color: var(--muted);
  font-size: 8px;
}

.quote-price {
  color: var(--green);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.quote-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.quote-item a {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.quote-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.guardrail-card {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid #d6e0f6;
  border-radius: 16px;
  background: var(--blue-soft);
}

.guardrail-card > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.guardrail-card strong,
.guardrail-card p {
  display: block;
}

.guardrail-card strong {
  font-size: 11px;
}

.guardrail-card p {
  margin: 4px 0 0;
  color: #53698f;
  font-size: 10px;
  line-height: 1.5;
}

.housing-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid #d9deeb;
  border-radius: 17px;
  background: white;
}

.housing-mark {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 20px;
  background: #f0f2f6;
  color: #a2a9b6;
  font-size: 19px;
  font-weight: 900;
  text-decoration: line-through 3px var(--red);
}

.housing-banner strong {
  display: block;
  font-size: 13px;
}

.housing-banner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.match-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: var(--shadow-tight);
}

.match-confidence {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
  font-weight: 850;
}

.match-confidence.probable {
  background: var(--amber-soft);
  color: var(--amber);
}

.match-card h4 {
  margin: 10px 0 4px;
  font-size: 13px;
}

.match-sources {
  color: var(--muted);
  font-size: 9px;
}

.match-saving {
  margin: 15px 0 8px;
  padding: 10px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
}

.match-saving strong,
.match-saving span {
  display: block;
}

.match-saving strong {
  font-size: 19px;
}

.match-saving span {
  font-size: 8px;
}

.match-evidence,
.match-flags {
  margin: 8px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.match-flags {
  color: var(--amber);
}

.listings-heading {
  margin-top: 30px;
}

.listing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.listing-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.listing-table th,
.listing-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.listing-table th {
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-table td {
  font-size: 10px;
}

.listing-table tr:last-child td {
  border-bottom: 0;
}

.listing-source {
  display: inline-block;
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

.listing-title strong,
.listing-title span {
  display: block;
}

.listing-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.delete-button {
  border: 0;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.policy-details {
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.policy-details summary {
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.policy-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-soft);
}

.policy-card strong {
  display: block;
  font-size: 10px;
}

.policy-card p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.policy-card a {
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.settings-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.settings-card h3 {
  font-size: 13px;
}

.settings-card p {
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.connection-state {
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
}

.connection-state.off,
.connection-state.pending {
  color: var(--amber);
}

.local-data-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 25px;
  border-radius: 20px;
  background: var(--ink);
  color: white;
}

.local-data-card h3 {
  max-width: 680px;
  font-size: 20px;
}

.local-data-card p:not(.kicker) {
  max-width: 680px;
  margin: 7px 0 0;
  color: #b9c1d0;
  font-size: 10px;
  line-height: 1.5;
}

.shield {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px 18px 24px 24px;
  color: #7ee0bc;
  font-size: 24px;
}

.app-dialog {
  width: min(620px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  color: var(--ink);
  box-shadow: 0 35px 90px rgba(25, 36, 61, 0.24);
}

.app-dialog.large-dialog {
  width: min(850px, calc(100vw - 28px));
}

.app-dialog::backdrop {
  background: rgba(20, 29, 49, 0.36);
  backdrop-filter: blur(5px);
}

.app-dialog form {
  padding: 25px;
}

.dialog-head {
  align-items: center;
  margin-bottom: 22px;
}

.dialog-head h2 {
  font-size: 23px;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 19px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid label,
.check-label {
  display: grid;
  gap: 6px;
  color: #4c5669;
  font-size: 9px;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid #dfe4ed;
  border-radius: 11px;
  outline: none;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 11px;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(360px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border: 1px solid #c7dfd5;
  border-radius: 13px;
  background: #f0fbf7;
  color: #176549;
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 700;
  animation: toast-in 180ms ease both;
}

.toast.error {
  border-color: #efc6ca;
  background: var(--red-soft);
  color: var(--red);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1050px) {
  :root { --sidebar: 210px; }
  .main { padding-inline: 28px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .card.wide { grid-column: auto; }
  .checklist-layout { grid-template-columns: minmax(0, 1fr); }
  .source-panel { position: static; }
  .provider-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column { grid-template-columns: minmax(0, 1fr); }
  .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 7px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(252, 253, 255, 0.95);
  }
  .brand,
  .sidebar-foot { display: none; }
  .main-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin: 0;
  }
  .nav-item {
    display: flex;
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border-radius: 11px;
    text-align: center;
  }
  .nav-item > span:first-child { font-size: 17px; }
  .nav-item > span:nth-child(2) { font-size: 8px; }
  .nav-item b { display: none; }
  .nav-item.is-active { box-shadow: none; background: var(--blue-soft); }
  .main { margin-left: 0; padding: 0 15px 45px; }
  .topbar { min-height: 98px; }
  .topbar h1 { font-size: 25px; }
  .sync-state { display: none; }
  .dashboard-grid { gap: 12px; }
  .card { padding: 18px; border-radius: 18px; }
  .pet-grid { grid-template-columns: minmax(0, 1fr); }
  .feasibility-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .readiness-card { align-items: center; }
  .readiness-ring { width: 94px; height: 94px; }
  .section-intro { align-items: flex-start; flex-direction: column; margin-top: 0; }
  .section-intro h2 { font-size: 28px; }
  .action-intro .button-row,
  .action-intro > .primary-button { width: 100%; }
  .action-intro .button-row > button,
  .action-intro > .primary-button { flex: 1; }
  .progress-copy { text-align: left; }
  .document-actions { width: 100%; align-items: flex-start; flex-direction: column; }
  .document-actions .button-row { width: 100%; }
  .document-actions .button-row button { flex: 1; }
  .task-card { grid-template-columns: 32px minmax(0, 1fr); }
  .task-state-select { grid-column: 2; width: 130px; }
  .provider-strip,
  .settings-grid,
  .match-grid,
  .policy-grid,
  .document-grid { grid-template-columns: minmax(0, 1fr); }
  .housing-banner { align-items: flex-start; }
  .form-grid,
  .form-grid.three-col { grid-template-columns: minmax(0, 1fr); }
  .span-2,
  .span-3 { grid-column: auto; }
  .app-dialog form { padding: 19px; }
  .settings-card { grid-template-columns: 42px 1fr; }
  .settings-card button { grid-column: 2; width: max-content; }
}

@media (max-width: 430px) {
  .route-labels { grid-template-columns: 1fr 1fr; }
  .route-duration { display: none; }
  .readiness-card { align-items: flex-start; }
  .readiness-ring { width: 82px; height: 82px; }
  .readiness-ring strong { font-size: 21px; }
  .pet-card { grid-template-columns: 50px 1fr auto; }
  .advisory { grid-template-columns: 30px 1fr; }
  .advisory a { grid-column: 2; }
  .local-data-card { align-items: flex-start; }
  .shield { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  @page { margin: 12mm; }
  body { padding: 0; background: white; color: black; }
  .sidebar,
  .topbar,
  .global-error,
  .phase-filter,
  .source-panel,
  .toast-region,
  .document-actions .button-row,
  .task-state-select,
  .attach-document,
  .document-links button { display: none !important; }
  .main { margin: 0; padding: 0; }
  .view { display: none !important; }
  .view[data-view="documentos"] { display: block !important; }
  .section-intro { margin: 0 0 8mm; }
  .checklist-layout { display: block; }
  .task-list { gap: 3mm; }
  .task-card,
  .document-card,
  .vault-panel { break-inside: avoid; box-shadow: none; }
  .task-card { grid-template-columns: 9mm 1fr; padding: 4mm; }
  .task-check { color: black; border-color: #777; }
  .task-card.done .task-check { color: white; }
  .task-copy p { font-size: 8pt; }
  .vault-panel { margin-bottom: 7mm; }
  .document-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Cloud access gate (rumbo-cloud only) ---- */
.lock-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 360px;
  width: calc(100vw - 48px);
  background: #ffffff;
  color: #1f2430;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}
.lock-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
.lock-form {
  display: grid;
  gap: 14px;
  padding: 28px;
  text-align: center;
}
.lock-form h2 {
  margin: 0;
  font-size: 1.3rem;
}
.lock-form p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.75;
}
.lock-form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 36, 48, 0.2);
  font-size: 1rem;
  text-align: center;
}
.lock-form button {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: #1f2430;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}
.lock-form .lock-error {
  color: #b3261e;
  font-weight: 600;
}

/* ---- Cómo funciona (onboarding explainer) ---- */
.how-card {
  position: relative;
  border-radius: 22px;
  padding: 28px 30px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1f2430;
}
.how-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: rgba(31, 36, 48, 0.08);
  color: #1f2430;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.how-close:hover { background: rgba(31, 36, 48, 0.16); }
.how-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #2563eb;
}
.how-card h2 { margin: 0 0 10px; font-size: 1.5rem; }
.how-lead { margin: 0 0 18px; font-size: 0.98rem; line-height: 1.5; opacity: 0.9; }
.how-steps {
  margin: 0 0 18px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
  line-height: 1.45;
}
.how-steps li { padding-left: 4px; }
.how-blockers {
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.22);
  margin-bottom: 14px;
}
.how-blockers p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.45; }
.how-blockers p:last-child { margin-bottom: 0; }
.how-foot { margin: 0; font-size: 0.85rem; opacity: 0.7; font-style: italic; }

@media (prefers-color-scheme: dark) {
  .how-card { color: #eef2ff; border-color: rgba(96, 165, 250, 0.28); }
  .how-close { background: rgba(255, 255, 255, 0.12); color: #eef2ff; }
  .how-close:hover { background: rgba(255, 255, 255, 0.22); }
  .how-kicker { color: #93c5fd; }
  .lock-dialog { background: #171b26; color: #eef2ff; }
  .lock-form input { background: #10131c; color: #eef2ff; border-color: rgba(255,255,255,0.16); }
  .lock-form button { background: #2563eb; }
}
