:root {
  --navy: #123B5D;
  --navy-2: #0F314B;
  --navy-deep: #0B2538;
  --teal: #2E8E95;
  --red: #C73A38;
  --gold: #D8C493;
  --gold-soft: #F5EEDC;
  --ink: #173247;
  --muted: #607481;
  --muted-2: #86949D;
  --cream: #F6F4EE;
  --paper: #FFFFFF;
  --canvas: #EEF2F1;
  --line: #DDE5E9;
  --line-strong: #CAD5DA;
  --soft: #EDF3F4;
  --teal-soft: #E7F4F5;
  --good: #3E7558;
  --good-soft: #E9F3ED;
  --warn: #8A6535;
  --warn-soft: #FAF1E3;
  --danger: #A63E3C;
  --danger-soft: #F9ECEA;
  --shadow: 0 12px 35px rgba(18, 59, 93, 0.08);
  --shadow-soft: 0 6px 22px rgba(18, 59, 93, 0.055);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 11px;
  --tap: 46px;
  --font: "Mulish", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); }
img { max-width: 100%; }

.app-shell {
  min-height: 100vh;
  background: var(--cream);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.topbar {
  height: calc(68px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 17px 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  min-width: 0;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
}
.brand-word {
  color: var(--red);
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand-divider { width: 1px; height: 22px; background: var(--line-strong); }
.brand-product {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.85px;
}
.header-action {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 13px;
  padding: 0 11px;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 12px;
}
.header-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 17px 30px;
  outline: none;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(29px, 8vw, 38px);
  line-height: 1.05;
  letter-spacing: -1.25px;
}
h2 { margin-bottom: 7px; color: var(--navy); font-size: 22px; line-height: 1.15; letter-spacing: -0.55px; }
h3 { margin-bottom: 4px; color: var(--ink); font-size: 16px; line-height: 1.25; }
p { line-height: 1.55; }

.eyebrow {
  margin-bottom: 7px;
  color: var(--teal);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 1.65px;
  text-transform: uppercase;
}
.lead { margin-bottom: 20px; color: #526a78; font-size: 15px; line-height: 1.62; }
.mini { color: var(--muted); font-size: 12px; line-height: 1.45; }
.micro { color: var(--muted); font-size: 10.5px; line-height: 1.4; }

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 17px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--navy), #174d64);
  box-shadow: var(--shadow);
  color: white;
}
.hero::after {
  content: "";
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  position: absolute;
  right: -70px;
  top: -80px;
}
.hero::before {
  content: "";
  width: 115px;
  height: 115px;
  background: rgba(216, 196, 147, .1);
  border-radius: 50%;
  position: absolute;
  right: -35px;
  bottom: -55px;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero p { max-width: 560px; color: rgba(255,255,255,.82); margin-bottom: 19px; }
.hero .eyebrow { color: var(--gold); }

.welcome-hero { min-height: 365px; display: flex; flex-direction: column; justify-content: flex-end; }
.welcome-mark {
  width: 80px;
  height: 80px;
  margin-bottom: 38px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}
.welcome-mark svg { width: 45px; height: 45px; stroke: var(--gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.card {
  margin-bottom: 13px;
  padding: 18px;
  border: 1px solid rgba(13,49,72,.08);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.card-flat { box-shadow: none; }
.card-accent { background: var(--teal-soft); border-color: #d4e5e4; }
.card-gold { background: var(--gold-soft); border-color: #eadcb9; }
.card-danger { background: var(--danger-soft); border-color: #efd3d0; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-start { display: flex; align-items: flex-start; gap: 12px; }
.stack { display: grid; gap: 11px; }
.section-head { margin: 23px 2px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin-bottom: 0; }

.btn {
  min-height: var(--tap);
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--gold); color: var(--navy-2); }
.btn-primary:hover { background: #dfcc9d; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid var(--line-strong); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #e8c5c2; }
.btn-small { min-height: 40px; padding: 9px 12px; border-radius: 12px; font-size: 12px; }
.full { width: 100%; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.text-button { border: 0; background: transparent; color: var(--navy); padding: 4px 0; font-weight: 800; font-size: 12px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.quick {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.quick:hover { border-color: #bdccd0; }
.quick-icon { width: 37px; height: 37px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; margin-bottom: 12px; }
.quick-icon svg { width: 21px; height: 21px; fill: none; stroke: var(--teal); stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.quick strong { display: block; margin-bottom: 4px; font-size: 14px; }
.quick .mini { margin-top: auto; }

.dog-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: none; }
.dog-strip::-webkit-scrollbar { display: none; }
.dog-chip {
  min-width: 147px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-align: left;
}
.dog-chip.active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(47,111,115,.1); }

.avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 17px;
  background: var(--soft);
  color: var(--navy);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}
.avatar.small { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; font-size: 15px; }
.avatar.large { width: 76px; height: 76px; flex-basis: 76px; border-radius: 23px; font-size: 25px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.score-ring {
  --score: 0%;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--score), #e6ecee 0);
}
.score-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.score-ring span { position: relative; z-index: 1; color: var(--navy); font-size: 18px; font-weight: 800; }
.score-ring small { position: relative; z-index: 1; margin-top: -11px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .5px; }
.score-empty { background: #e6ecee; }

.metric-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.metric { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.metric-value { color: var(--navy); font-size: 23px; font-weight: 800; line-height: 1; }
.metric-label { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.delta { color: var(--teal); font-size: 12px; font-weight: 800; }
.delta.down { color: var(--warn); }
.delta.neutral { color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 9px; background: var(--soft); color: var(--navy); font-size: 10.5px; font-weight: 800; line-height: 1; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.gold { background: var(--gold-soft); color: #705a2a; }
.pill.red { background: var(--danger-soft); color: var(--danger); }

.notice, .warning, .privacy-note {
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 12px;
  line-height: 1.5;
}
.notice { background: var(--good-soft); border: 1px solid #d5e5da; color: #496252; }
.warning { background: var(--warn-soft); border: 1px solid #ead9bd; color: #76552f; }
.privacy-note { background: var(--soft); border: 1px solid #d8e3e5; color: #506771; }

.form-group { margin-bottom: 15px; }
label, .field-label { display: block; margin-bottom: 7px; color: #536b77; font-size: 12px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,111,115,.1); }
.help { margin-top: 6px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-label { min-height: 46px; border: 1px dashed var(--line-strong); border-radius: 13px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--navy); font-size: 12px; font-weight: 800; cursor: pointer; }
.file-label input { display: none; }

.assessment-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #e6ecee; margin: 6px 0 22px; }
.assessment-progress span { display: block; height: 100%; background: var(--teal); border-radius: inherit; transition: width .2s ease; }
.question-title { font-size: 23px; line-height: 1.2; letter-spacing: -.55px; color: var(--navy); margin-bottom: 8px; }
.answer-list { display: grid; gap: 8px; margin-top: 18px; }
.answer-option {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  font-weight: 700;
}
.answer-option.selected { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(47,111,115,.08); }
.answer-dot { width: 20px; height: 20px; border: 1.5px solid #adbdc2; border-radius: 50%; flex: 0 0 20px; position: relative; }
.answer-option.selected .answer-dot { border-color: var(--teal); }
.answer-option.selected .answer-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--teal); }

.segmented { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; }
.segmented button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.segmented button.selected { background: var(--navy); border-color: var(--navy); color: #fff; }
.segment-labels { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 9.5px; }

.trend { height: 190px; margin-top: 10px; }
.trend svg { width: 100%; height: 100%; overflow: visible; }
.axis { stroke: #dfe7e9; stroke-width: 1; }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#areaGradient); }
.chart-dot { fill: #fff; stroke: var(--teal); stroke-width: 2.5; }
.chart-label { fill: var(--muted); font: 10px var(--font); }
.chart-value { fill: var(--navy); font: 800 10px var(--font); }
.legend { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-top: 5px; }

.timeline { margin: 15px 0 0 7px; padding-left: 20px; border-left: 2px solid #dce5e7; }
.event { position: relative; padding-bottom: 20px; }
.event:last-child { padding-bottom: 2px; }
.event::before { content: ""; width: 10px; height: 10px; position: absolute; left: -26px; top: 4px; border-radius: 50%; background: var(--teal); border: 3px solid var(--cream); }
.card .event::before { border-color: #fff; }
.event.systemavit::before { background: var(--red); }
.event-date { margin-bottom: 3px; color: var(--muted); font-size: 10.5px; }

.history-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; padding-bottom: 0; }
.history-item:first-child { padding-top: 0; }

.product-mark { color: var(--red); font-weight: 800; }
.product-card { overflow: hidden; position: relative; }
.product-card::after { content: ""; width: 125px; height: 125px; position: absolute; right: -48px; top: -55px; border-radius: 50%; background: rgba(216,196,147,.23); }
.product-card > * { position: relative; z-index: 1; }

.empty { padding: 28px 10px; text-align: center; color: var(--muted); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--soft); color: var(--teal); }
.empty-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-nav {
  height: calc(72px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: repeat(4,1fr);
}
.nav-item {
  min-height: 66px;
  border: 0;
  background: transparent;
  color: #7b8c95;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
}
.nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--navy); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  padding-top: env(safe-area-inset-top);
  background: rgba(5, 23, 34, .52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .15s ease-out;
}
.sheet {
  width: min(100%, 640px);
  max-height: min(92vh, 780px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 25px 25px 0 0;
  background: var(--cream);
  padding: 9px 17px calc(26px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 45px rgba(4,23,34,.16);
  animation: sheetUp .18s ease-out;
}
.sheet-handle { width: 42px; height: 4px; border-radius: 999px; background: #c7d2d5; margin: 2px auto 8px; }
.sheet-head { min-height: 50px; margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; }
.sheet-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sheet-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9px; margin-top: 18px; }
body.modal-open { overflow: hidden; }

.toast {
  max-width: min(90vw, 430px);
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 13px;
  background: var(--navy-2);
  color: #fff;
  padding: 11px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.install-steps { counter-reset: steps; display: grid; gap: 10px; }
.install-step { display: flex; gap: 11px; align-items: flex-start; }
.install-step::before { counter-increment: steps; content: counter(steps); width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--soft); color: var(--navy); display: grid; place-items: center; font-size: 11px; font-weight: 800; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(25px); opacity: .7; } }

@media (max-width: 390px) {
  .brand-product { display: none; }
  .brand-divider { display: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick { min-height: 104px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .button-row { grid-template-columns: 1fr; }
  .inline-fields { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
  main { padding: 30px 24px 42px; }
  .hero { padding: 30px; }
  .quick-grid { grid-template-columns: repeat(4,1fr); }
  .quick { min-height: 152px; }
  .metric-grid { grid-template-columns: repeat(4,1fr); }
  .sheet { border-radius: 25px; margin-bottom: 20px; }
  .modal-backdrop { align-items: center; padding: 20px; }
}

@media (min-width: 980px) {
  .app-shell { padding: 0 0 0 214px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  main { width: min(100%, 900px); padding: 42px 34px 60px; }
  .app-nav {
    width: 214px;
    height: calc(100vh - 68px);
    top: 68px;
    right: auto;
    bottom: auto;
    padding: 22px 14px;
    border-top: 0;
    border-right: 1px solid var(--line);
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 54px);
    align-content: start;
    gap: 5px;
    background: #fff;
  }
  .nav-item {
    min-height: 54px;
    padding: 0 14px;
    border-radius: 13px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 13px;
  }
  .nav-item.active { background: var(--soft); }
  .toast { bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
button:disabled { cursor: not-allowed; opacity: .45; }
sup { font-size: .62em; line-height: 0; position: relative; top: -.35em; }


/* Brand-aligned refinements */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at top right, rgba(217,197,143,.14), transparent 28%),
    radial-gradient(circle at top left, rgba(199,58,56,.05), transparent 22%);
}

.topbar{
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 18px rgba(18,59,93,.035);
}

.brand-wordmark{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.brand-word{
  color: var(--red);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand-tagline{
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
}
.brand-product{
  color: var(--navy);
  font-size: 10.5px;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-action{
  border-color: #E8DFC2;
  background: var(--gold-soft);
}
.header-action:hover{
  background:#F0E6C8;
}

.eyebrow{
  color: var(--teal);
}
h1,h2{
  letter-spacing:-1px;
}

.hero{
  background:
    linear-gradient(145deg, rgba(18,59,93,1) 0%, rgba(20,72,95,1) 72%, rgba(35,92,110,1) 100%);
  border:1px solid rgba(255,255,255,.08);
}
.hero::after{
  border-color: rgba(255,255,255,.14);
}
.hero::before{
  background: rgba(217,197,143,.14);
}
.welcome-mark{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}
.welcome-mark svg{
  stroke: var(--gold);
}

.card{
  border-color: rgba(18,59,93,.075);
}
.card-gold{
  background: linear-gradient(180deg, #F7F1DF 0%, #F4E9CD 100%);
  border-color:#E8D9AE;
}
.card-accent{
  background: linear-gradient(180deg, #EEF5F5 0%, #E7EFF0 100%);
}
.privacy-note{
  background:#EEF4F5;
  border-color:#D9E5E7;
}

.btn{
  border-radius: 14px;
}
.btn-primary{
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.04);
}
.btn-primary:hover{
  background:#DFC98F;
}
.btn-navy{
  background: var(--navy);
}
.btn-secondary{
  border-color: var(--line-strong);
}
.quick{
  border-color: var(--line);
  background: rgba(255,255,255,.92);
}
.quick:hover{
  border-color:#C8D6DB;
}
.quick-icon{
  background: var(--gold-soft);
  color: var(--navy);
}
.quick strong{
  color: var(--navy);
}

.score-ring{
  background: conic-gradient(var(--teal) var(--score), #E5ECEE 0);
}
.score-ring::after{
  background:#fff;
}
.score-ring span{
  color: var(--navy);
}

.metric{
  background:#FBFCFC;
  border-color:var(--line);
}

.pill.gold{
  background:#F6ECD2;
  color:#755C29;
}

.app-nav{
  background: rgba(255,255,255,.97);
  border-top:1px solid var(--line);
}
.nav-item.active{
  color: var(--navy);
}
.nav-item.active svg{
  stroke: var(--red);
}

.site-links{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.site-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:48px;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--navy);
  text-decoration:none;
  font-weight:800;
}
.site-link small{
  display:block;
  color:var(--muted);
  font-weight:700;
  font-size:11px;
  margin-top:2px;
}
.motto-card{
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFC 100%);
}
.footer-note{
  text-align:center;
  padding:4px 0 16px;
}
.footer-note a{
  color: var(--navy);
  text-decoration:none;
  font-weight:800;
}

@media (max-width: 520px){
  .brand-tagline{
    display:none;
  }
}

@media (min-width: 840px){
  .app-shell{
    width:min(100%, 1180px);
    margin:0 auto;
  }
}


/* Live-site brand alignment v1.0.2 */
.brand-logo{
  display:block;
  width:auto;
  height:34px;
}
.brand-product-wrap{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.brand-sub{
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
}
.brand-tagline{ display:none; }
.brand-wordmark{ display:none; }

.topbar{
  background: rgba(255,255,255,.98);
}

.btn-primary{
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover{
  background:#257E84;
}
.btn-navy{
  background: var(--navy);
  color:#fff;
}
.quick-icon{
  background: var(--teal-soft);
  color: var(--teal);
}
.eyebrow{
  color: var(--teal);
}
.score-ring{
  background: conic-gradient(var(--teal) var(--score), #E5ECEE 0);
}
.nav-item.active svg{
  stroke: var(--teal);
}
.card-gold{
  background: linear-gradient(180deg, #F8F5EC 0%, #F4EEDC 100%);
  border-color:#E7DDC0;
}
.pill.gold{
  background: var(--gold-soft);
  color:#745B2A;
}

.hero-light{
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFC 100%);
  color: var(--ink);
  border:1px solid rgba(18,59,93,.08);
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:center;
}
.hero-light h1{
  color: var(--navy);
}
.hero-light p{
  color: #556B79;
}
.hero-light .eyebrow{
  color: var(--teal);
}
.hero-light::before{
  display:none;
}
.hero-light::after{
  width: 180px;
  height: 180px;
  right: -50px;
  top: auto;
  bottom: -65px;
  border-color: rgba(46,142,149,.10);
}
.hero-media{
  position:relative;
  min-height:200px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.hero-pack{
  width:min(100%, 210px);
  height:auto;
  filter: drop-shadow(0 16px 30px rgba(18,59,93,.12));
}
.hero-dog-badge{
  position:absolute;
  right:0;
  bottom:0;
  width:92px;
  height:92px;
  border-radius:50%;
  overflow:hidden;
  background:#fff;
  border:4px solid #fff;
  box-shadow:0 10px 20px rgba(18,59,93,.12);
}
.hero-dog-badge img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.product-media-card{
  display:grid;
  grid-template-columns: 1fr 130px;
  gap:14px;
  align-items:center;
}
.product-pack{
  width:100%;
  max-width:120px;
  height:auto;
  justify-self:end;
  filter: drop-shadow(0 14px 24px rgba(18,59,93,.12));
}
.feature-points{
  display:grid;
  gap:10px;
  margin-top:14px;
}
.feature-point{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.feature-point .quick-icon{
  flex:none;
}

.section-brand-note{
  display:flex;
  align-items:center;
  gap:10px;
}
.section-brand-note img{
  height:28px;
  width:auto;
  display:block;
}

@media (max-width: 700px){
  .hero-light{
    grid-template-columns:1fr;
  }
  .hero-media{
    order:-1;
    min-height:155px;
  }
  .hero-pack{
    width:min(100%, 165px);
  }
  .hero-dog-badge{
    width:74px;
    height:74px;
    right:4px;
    bottom:-4px;
  }
  .product-media-card{
    grid-template-columns:1fr;
  }
  .product-pack{
    justify-self:center;
    max-width:140px;
  }
}


/* v1.0.5 — precision spacing & alignment pass
   Keeps the comfortable original sizing; standardises position, padding and alignment. */

:root{
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-7:28px;
  --space-8:32px;
  --content-pad:18px;
  --section-gap:28px;
  --control-h:48px;
}

/* Global rhythm */
main{
  width:min(100%, 800px);
  padding:var(--space-6) var(--content-pad) 34px;
}
h1{ margin-bottom:var(--space-3); }
h2{ margin-bottom:var(--space-2); }
h3{ margin-bottom:var(--space-1); }
p:last-child{ margin-bottom:0; }
.lead{ margin-bottom:var(--space-6); }
.eyebrow{ margin-bottom:var(--space-2); }
.section-head{
  margin:var(--section-gap) 0 var(--space-3);
  padding:0;
  align-items:flex-end;
}
.section-head > div{ min-width:0; }
.section-head h2{ margin:0; }

/* Header */
.topbar{
  min-height:calc(68px + env(safe-area-inset-top));
  height:auto;
  padding:env(safe-area-inset-top) var(--content-pad) 0;
}
.brand{
  min-height:48px;
  gap:var(--space-3);
}
.brand-logo{
  display:block;
  height:34px;
  width:auto;
  flex:none;
}
.brand-divider{
  height:24px;
  margin:0 1px;
}
.brand-product-wrap{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  min-width:0;
}
.brand-product{ line-height:1.1; }
.brand-sub{ line-height:1.15; }
.header-action{
  min-height:42px;
  padding:0 13px;
  justify-content:center;
}

/* Cards and containers */
.card{
  margin-bottom:var(--space-4);
  padding:var(--space-5);
}
.card > :first-child{ margin-top:0; }
.card > :last-child{ margin-bottom:0; }
.row{
  gap:var(--space-4);
  min-width:0;
}
.row-start{
  gap:var(--space-4);
  min-width:0;
}
.row > :first-child,
.row-start > :not(.avatar):not(.quick-icon){
  min-width:0;
}
.stack{ gap:var(--space-3); }

/* Hero */
.compact-hero{
  display:block;
  padding:var(--space-6);
  margin-bottom:var(--space-5);
  box-shadow:var(--shadow-soft);
}
.compact-hero p{
  margin-bottom:var(--space-5);
  max-width:620px;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:var(--space-3);
  margin-top:var(--space-5);
}
.hero-actions .btn{
  min-height:var(--control-h);
}
.hero-actions .btn:first-child{
  min-width:180px;
}

/* Buttons */
.btn{
  min-height:var(--control-h);
  padding:12px 16px;
  border-radius:14px;
  line-height:1.15;
  white-space:normal;
}
.btn svg{
  width:19px;
  height:19px;
  flex:none;
}
.btn-small{
  min-height:42px;
  padding:10px 13px;
}
.button-row{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--space-3);
  align-items:stretch;
}
.button-row > *{
  width:100%;
  min-width:0;
}

/* Dog selector */
.dog-strip{
  gap:var(--space-3);
  padding:2px 1px var(--space-3);
  scroll-padding-inline:1px;
}
.dog-chip{
  min-width:154px;
  min-height:64px;
  padding:var(--space-3);
  gap:10px;
  align-items:center;
}
.dog-chip strong{
  line-height:1.2;
}
.dog-chip-copy{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
}
.dog-chip-copy strong,
.dog-chip-copy .micro{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dog-add-icon{
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:var(--soft);
  color:var(--teal);
}
.dog-add-icon svg{
  width:19px;
  height:19px;
}
.avatar.small{
  width:40px;
  height:40px;
  flex-basis:40px;
}
.avatar.large{
  width:76px;
  height:76px;
  flex-basis:76px;
}

/* Score/metrics */
.score-ring{
  width:74px;
  height:74px;
  flex:0 0 74px;
}
.score-ring span{
  line-height:1;
  align-self:end;
  margin-bottom:2px;
}
.score-ring small{
  align-self:start;
  margin-top:0;
}
.metric-grid{
  gap:var(--space-3);
  margin-top:var(--space-5) !important;
}
.metric{
  min-height:82px;
  padding:14px 15px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.metric-value{ line-height:1; }
.metric-label{ margin-top:7px; }

/* Quick actions */
.quick-grid{
  gap:var(--space-3);
}
.quick{
  min-height:136px;
  padding:var(--space-4);
  border-radius:17px;
}
.quick-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  margin-bottom:var(--space-3);
}
.quick strong{
  margin-bottom:var(--space-1);
  line-height:1.25;
}
.quick .mini{
  margin-top:auto;
}

/* Welcome features */
.compact-feature-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:var(--space-3);
  margin-bottom:var(--space-4);
}
.compact-feature{
  min-height:76px;
  padding:var(--space-4);
  display:flex;
  align-items:center;
  gap:var(--space-4);
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
}
.compact-feature .quick-icon{
  margin:0;
}
.compact-feature strong{
  display:block;
  margin-bottom:2px;
  color:var(--navy);
  line-height:1.25;
}
.compact-feature .mini{
  display:block;
}

/* Product / routine cards without product imagery */
.product-media-card{ display:block; }
.hero-media,.hero-pack,.hero-dog-badge,.product-pack{ display:none !important; }
.compact-product{
  padding:var(--space-5);
}
.compact-product p{
  margin-bottom:0;
}
.card-gold .row-start{
  align-items:flex-start;
}
.card-gold .pill{
  flex:none;
  margin-top:1px;
}

/* History / timeline */
.history-item{
  padding:var(--space-4) 0;
}
.history-item .row{
  align-items:flex-start;
}
.history-item .pill{
  flex:none;
  margin-top:2px;
}
.timeline{
  margin-top:var(--space-4);
}
.event{
  padding-bottom:var(--space-5);
}

/* Notices */
.privacy-note,.notice,.warning{
  padding:13px 14px;
  border-radius:14px;
  line-height:1.5;
}
.privacy-note{
  display:flex;
  align-items:flex-start;
  gap:9px;
}
.privacy-note svg{
  flex:0 0 18px;
  width:18px;
  height:18px;
  margin-top:1px;
}

/* Forms */
.form-group{
  margin-bottom:var(--space-4);
}
.form-group label{
  margin-bottom:7px;
}
input,select,textarea{
  min-height:46px;
  padding:12px 13px;
}
textarea{
  min-height:92px;
}
.inline-fields{
  gap:var(--space-3);
}
.file-label{
  min-height:48px;
}
.segmented{
  gap:6px;
}
.segmented button{
  min-height:46px;
}
.answer-list{
  gap:9px;
  margin-top:var(--space-5);
}
.answer-option{
  min-height:54px;
  padding:12px 14px;
}

/* Sheets/modals */
.sheet{
  padding:9px var(--content-pad) calc(28px + env(safe-area-inset-bottom));
}
.sheet-head{
  min-height:52px;
  margin-bottom:var(--space-2);
}
.sheet-actions{
  gap:var(--space-3);
  margin-top:var(--space-5);
}
.sheet-close{
  width:42px;
  height:42px;
  flex:none;
}

/* More screen */
.site-links{
  gap:var(--space-3);
}
.site-link{
  min-height:52px;
  padding:13px 14px;
  align-items:center;
}
.site-link svg{
  width:18px;
  height:18px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Navigation */
.app-nav{
  height:calc(74px + env(safe-area-inset-bottom));
}
.nav-item{
  min-height:68px;
  gap:5px;
}
.nav-item svg{
  width:22px;
  height:22px;
}

/* Make all cards/buttons line up on narrow screens without shrinking them */
@media (max-width:390px){
  .brand-sub{ display:none; }
  .button-row{ grid-template-columns:1fr; }
  .inline-fields{ grid-template-columns:1fr; }
  .quick-grid{ grid-template-columns:1fr; }
  .quick{ min-height:112px; }
}

/* Tablet */
@media (min-width:520px){
  .compact-feature-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* Desktop: preserve scale, improve geometry */
@media (min-width:700px){
  :root{
    --content-pad:24px;
    --section-gap:32px;
  }
  main{
    padding:32px var(--content-pad) 46px;
  }
  .compact-hero{
    padding:30px;
  }
  .quick-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .quick{
    min-height:154px;
  }
  .metric-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .card{
    padding:22px;
  }
  .sheet{
    padding-left:22px;
    padding-right:22px;
  }
}

/* Desktop sidebar */
@media (min-width:980px){
  .app-shell{
    padding-left:214px;
  }
  .topbar{
    padding-left:26px;
    padding-right:26px;
  }
  main{
    width:min(100%,920px);
    padding:42px 34px 60px;
  }
  .app-nav{
    width:214px;
    height:calc(100vh - 68px);
    top:68px;
    padding:22px 14px;
    grid-template-columns:1fr;
    grid-template-rows:repeat(4,54px);
    gap:6px;
  }
  .nav-item{
    min-height:54px;
    padding:0 14px;
    gap:12px;
    justify-content:flex-start;
    flex-direction:row;
  }
}

@media (max-width:360px){
  #installButton{
    width:42px;
    min-width:42px;
    padding:0;
    justify-content:center;
  }
  #installButton span{ display:none; }
}

/* Prevent accidental visual drift from inline width constraints */
.card .button-row,
.product-card .button-row{
  width:100%;
}

/* Accounts and cloud sync */
.header-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.account-action{
  width:42px;
  min-width:42px;
  padding:0;
  justify-content:center;
  border-radius:50%;
  color:#fff;
  background:var(--navy);
  border-color:var(--navy);
}
.account-action span{
  font-size:13px;
  line-height:1;
}
.account-action svg{ display:none; }
.auth-mode .app-nav,
.auth-mode #installButton,
.auth-mode #accountButton{
  display:none !important;
}
.auth-mode{
  padding-bottom:0;
}
.auth-wrap{
  min-height:calc(100vh - 134px);
  display:grid;
  place-items:center;
  padding:8px 0 28px;
}
.auth-card{
  width:min(100%,510px);
  padding:24px;
  border:1px solid rgba(13,49,72,.09);
  border-radius:var(--radius-xl);
  background:var(--paper);
  box-shadow:var(--shadow);
}
.auth-card h1{
  margin-bottom:10px;
}
.auth-card form{
  margin-top:18px;
}
.auth-install{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
  text-align:center;
}
.auth-install .help{
  margin-top:8px;
}
.auth-switch{
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--muted);
  text-align:center;
  font-size:13px;
}
.text-button{
  min-height:42px;
  border:0;
  padding:4px 0;
  background:transparent;
  color:var(--navy);
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:3px;
}
.text-button.full{ width:100%; }
.label-row{
  min-height:28px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.label-row .text-button{
  min-height:auto;
  margin-top:-3px;
  font-size:12px;
}
.check-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:4px 0 18px;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.check-row input{
  width:20px;
  min-width:20px;
  min-height:20px;
  margin:1px 0 0;
  accent-color:var(--teal);
}
.success-notice{
  margin-bottom:16px;
  background:var(--good-soft);
  color:var(--good);
}
.error-notice{
  margin-bottom:16px;
  background:var(--danger-soft);
  color:var(--danger);
}
.loading-mark{
  width:46px;
  height:46px;
  margin-bottom:20px;
  border:4px solid var(--teal-soft);
  border-top-color:var(--teal);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.account-avatar{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--navy);
  color:#fff;
  font-weight:800;
}
.account-email{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sync-state{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:8px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}
.sync-state span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--good);
}
.sync-state.syncing span,
.sync-state.pending span{ background:var(--warn); }
.sync-state.error span,
.sync-state.offline span{ background:var(--muted-2); }
.modal-rule{
  margin:24px 0;
  border:0;
  border-top:1px solid var(--line);
}
.danger-link{ color:var(--danger); }

@media (min-width:700px){
  .auth-card{ padding:32px; }
}

@media (min-width:980px){
  .auth-mode{ padding-left:0; }
  .auth-mode main{ width:min(100%,760px); }
}
