/* ZipAisle redesigned UI — shared styles (see UX_REDESIGN_SPEC.md) */
:root{
  --green:#149914; --green-dark:#0f7a0f; --green-press:#127412;
  --ink:#111811; --muted:#638863; --faint:#8aa08a; --pale:#9db39d;
  --bg:#f7faf7; --line:#e5ece5; --line-soft:#eef3ee; --line-input:#dbe5db;
  --chip-bg:#eaf2ea; --tint:#dff3df; --row:#f2f6f2; --disabled:#a7c4a7;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0;background:var(--bg);font-family:'Work Sans',sans-serif;color:var(--ink)}
a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-dark);text-decoration:underline}
input{font-family:inherit;color:var(--ink)}
input::placeholder{color:var(--pale)}
.ms{font-family:'Material Symbols Outlined';font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}

/* ---------- header + stepper ---------- */
.pp-header{display:flex;align-items:center;justify-content:space-between;padding:14px 32px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;gap:12px}
.pp-logo{display:flex;align-items:center;gap:8px;color:var(--ink)}
.pp-logo:hover{text-decoration:none;opacity:.85}
.pp-logo .mark{width:22px;height:22px;border-radius:6px;background:var(--green);display:flex;align-items:center;justify-content:center}
.pp-logo .mark .ms{font-size:14px;color:#fff}
.pp-logo .name{font-weight:700;font-size:16px}
.steps{display:flex;align-items:center;gap:26px}
.step{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--faint)}
.step .dot{width:20px;height:20px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e7eee7;color:var(--faint);font-size:11px;font-weight:700}
.step .dot .ms{font-size:13px}
.step.done{color:var(--green)}
.step.done .dot{background:var(--green);color:#fff}
a.step.done:hover{text-decoration:none;opacity:.85}
.step.active{color:var(--ink);font-weight:700}
.step.active .dot{background:var(--ink);color:#fff}
.step.working .dot{background:transparent;border:2px dashed var(--green);color:var(--green)}
.conn{width:32px;height:2px;border-radius:1px;background:var(--line-input)}
.conn.on{background:var(--green)}
.pp-header .side{display:flex;align-items:center;gap:16px;min-width:96px;justify-content:flex-end}
.zip-badge{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:5px}
.zip-badge .ms{font-size:16px}
.header-action{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer;background:none;border:none;font-family:inherit}
.header-action:hover{color:var(--green)}
.header-action .ms{font-size:16px}

/* ---------- primitives ---------- */
.wrap{width:100%;max-width:1100px;margin:0 auto}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:15px;border-radius:10px;border:none;cursor:pointer;font-family:inherit;padding:0 24px;height:52px}
.btn-primary{background:var(--green);color:#fff}
.btn-primary:hover{filter:brightness(.94)}
.btn-primary:disabled{background:var(--disabled);cursor:default;filter:none}
.btn .ms{font-size:18px}
.field{display:flex;align-items:center;gap:10px;background:#fff;border:1.5px solid var(--line-input);border-radius:10px;padding:0 16px;height:52px}
.field .ms{font-size:20px;color:var(--faint)}
.field input{border:none;outline:none;background:transparent;font-size:15px;width:100%}
.field.accent{border-color:var(--green);box-shadow:0 1px 4px rgba(20,153,20,.12)}
.field.accent .ms{color:var(--green)}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px}
.chip{font-size:12.5px;font-weight:600;color:var(--muted);background:var(--chip-bg);border-radius:999px;padding:7px 14px;cursor:pointer;border:none;font-family:inherit;flex:none}
.chip:hover{background:var(--tint);color:var(--green-press)}
.tipbox{background:var(--chip-bg);border-radius:12px;padding:16px 18px;font-size:13px;line-height:1.5;color:#3f5c3f}
.list-main .tipbox{display:none}
.seg{display:flex;background:var(--chip-bg);border-radius:10px;padding:4px;gap:4px}
.seg button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 18px;border-radius:8px;font-size:13.5px;cursor:pointer;font-weight:600;color:#537553;background:transparent;border:none;font-family:inherit}
.seg button.on{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12);font-weight:700;color:var(--ink)}
.muted{color:var(--muted)}
.privacy{display:flex;align-items:flex-start;justify-content:center;gap:7px;font-size:12.5px;color:var(--faint);line-height:1.5;text-align:center}
.privacy .ms{font-size:15px;line-height:1.3}
.h1{font-size:28px;font-weight:900;letter-spacing:-.02em;margin:0}
.sub{font-size:14px;color:var(--muted);margin:0}

/* ---------- step 1: location ---------- */
.loc-page{display:flex;flex-direction:column;align-items:center;padding:88px 32px 96px}
.loc-col{width:460px;max-width:100%;display:flex;flex-direction:column;gap:22px}
.loc-col .headline{display:flex;flex-direction:column;gap:8px;text-align:center}
.loc-col .headline .h1{font-size:32px}
.loc-col .headline .sub{font-size:14.5px;line-height:1.55}
.loc-row{display:flex;gap:10px}
.loc-row .field{flex:1;height:56px}
.loc-row .field input{font-size:17px;font-weight:600;letter-spacing:.04em}
.loc-row .btn{height:56px;padding:0 26px}
.or-sep{display:flex;align-items:center;gap:12px;color:var(--faint);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin:-4px 0}
.or-sep::before,.or-sep::after{content:"";flex:1;height:1px;background:var(--line)}
.btn-geo{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:50px;font-family:inherit;font-weight:600;font-size:14.5px;color:var(--green);background:#fff;border:1.5px solid var(--line-input);border-radius:10px;cursor:pointer}
.btn-geo:hover{border-color:var(--green);background:var(--tint)}
.btn-geo:disabled{cursor:default;color:var(--faint);background:#fff;border-color:var(--line-input)}
.btn-geo .ms{font-size:19px}
.geo-status{margin:-8px 0 0;font-size:12.5px;line-height:1.45;text-align:center;color:var(--muted)}
.geo-status.ok{color:var(--green-press)}
.geo-status.err{color:#c0392b}

/* ---------- step 2: list ---------- */
.list-page{display:grid;grid-template-columns:1fr 300px;gap:28px;padding:32px 32px 48px}
.list-main{display:flex;flex-direction:column;gap:18px}
.add-row{display:flex;gap:10px}
.add-row .field{flex:1}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.items{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.item-row{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:14px 16px}
.item-row .name{flex:1;font-size:15px;font-weight:500;line-height:1.3}
.qty{display:flex;align-items:center;gap:12px;background:var(--row);border-radius:8px;padding:5px 10px;font-size:13px;font-weight:700}
.qty button{border:none;background:none;cursor:pointer;font-family:inherit;font-size:14px;font-weight:700;padding:2px 6px}
.qty .minus{color:var(--faint)} .qty .minus:hover{color:var(--ink)}
.qty .plus{color:var(--green)} .qty .plus:hover{color:var(--green-dark)}
.item-row .remove{border:none;background:none;cursor:pointer;color:#b7c7b7;padding:4px}
.item-row .remove:hover{color:#c0392b}
.item-row .remove .ms{font-size:18px}
.list-side{display:flex;flex-direction:column;gap:12px}
.summary{display:flex;flex-direction:column;gap:14px;padding:20px}
.summary .label{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.summary .row{display:flex;justify-content:space-between;font-size:14px}
.summary .row b{font-weight:700}
.summary hr{border:none;height:1px;background:var(--line);margin:0}
.mobile-cta{display:none}

/* ---------- working ---------- */
.working-page{padding:32px;display:flex;flex-direction:column;gap:20px;max-width:640px}
.progress{height:10px;background:#e7eee7;border-radius:999px;overflow:hidden}
.progress>div{height:100%;background:var(--green);border-radius:999px;transition:width .25s linear;width:0}
.progress-meta{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}
.savedbox{background:var(--chip-bg);border-radius:12px;padding:16px 18px;font-size:13px;line-height:1.5;color:#3f5c3f;display:flex;gap:9px}
.savedbox .ms{font-size:17px;line-height:1.3;color:var(--green)}
.errbox{display:flex;flex-direction:column;gap:12px;align-items:flex-start;padding:24px}
.work-stores{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.wstore{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:13.5px;transition:border-color .2s,box-shadow .2s,opacity .2s}
.wstore .ms{font-size:19px;color:var(--faint);flex:none}
.wstore .wname{font-weight:600;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wstore .wstat{font-size:12px;color:var(--faint);flex:none}
.wstore.queued{opacity:.65}
.wstore.checking{border-color:var(--green);box-shadow:0 1px 5px rgba(20,153,20,.12)}
.wstore.checking .ms{color:var(--green);animation:pp-spin 1s linear infinite}
.wstore.checking .wstat{color:var(--green-press);font-weight:600}
.wstore.done .ms{color:var(--green)}
.wstore.done .wstat{color:var(--muted)}
@keyframes pp-spin{to{transform:rotate(360deg)}}
/* notify-me panel (working / saved-trip states) */
.notify{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.notify-head{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700}
.notify-head .ms{font-size:19px;color:var(--green)}
.notify-copy{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.notify-row{display:flex;gap:10px}
.notify-row .field{flex:1}
.notify-row .btn{flex:none;height:52px}
.notify-status{margin:0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.notify-status.ok{color:var(--green-press)}
.notify-status.err{color:#c0392b}

/* ---------- results ---------- */
.tabs{display:flex;gap:28px;padding:0 32px;background:#fff;border-bottom:1px solid var(--line)}
.tab{display:flex;align-items:center;gap:6px;padding:12px 2px 10px;font-size:13.5px;cursor:pointer;font-weight:600;color:var(--faint);border:none;background:none;font-family:inherit;border-bottom:2.5px solid transparent}
.tab .ms{font-size:16px}
.tab:hover{color:var(--ink)}
.tab.on{font-weight:700;color:var(--ink);border-bottom-color:var(--green)}
.tab.on .ms{color:var(--green)}
.results-pane{padding:28px 32px 48px;display:flex;flex-direction:column;gap:24px}
/* Where the prices came from and when they were read. Was .fresh, which claimed
   a recency the week-long shared cache cannot deliver — renamed so the name
   can't drift back into a freshness stamp. align-items:flex-start, not center:
   this is two lines now and a centred icon floats between them. */
.readout{display:flex;align-items:flex-start;gap:9px;background:var(--tint);border-radius:10px;padding:11px 14px;font-size:13px;color:var(--green-press);line-height:1.45;align-self:flex-start;max-width:72ch}
.readout .ms{font-size:17px;color:var(--green);flex:none}
.readout-age{display:block;opacity:.82;margin-top:2px}
.readout-age:empty{display:none}
.plan-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap}
.plan-total{font-size:44px;font-weight:900;letter-spacing:-.03em}
.save-chip{background:var(--tint);color:var(--green-press);font-weight:700;font-size:14px;border-radius:999px;padding:6px 14px}
.eyebrow{font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.plan-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}
.store-head{display:flex;align-items:center;gap:10px;background:var(--row);border-radius:8px;padding:10px 14px}
.store-head .ms{font-size:18px;color:var(--green)}
.store-head .total{margin-left:auto;font-weight:700;font-size:14px}
.plan-line{display:flex;justify-content:space-between;gap:14px;padding:4px 14px 4px 42px;font-size:14px}
.plan-line .note{color:var(--pale);font-size:12.5px}
.plan-line .price{font-weight:600;flex:none}
.bars{display:flex;flex-direction:column;gap:9px;font-size:13px}
.bar-row{display:flex;align-items:center;gap:10px}
.bar-row .bname{width:96px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-row .track{flex:1;height:16px;background:var(--line-soft);border-radius:999px;overflow:hidden}
.bar-row .fill{height:100%;border-radius:999px}
.bar-row .btotal{width:56px;text-align:right;font-weight:700}
/* compare table (desktop) */
.cmp-table{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.cmp-table table{width:100%;border-collapse:collapse;font-size:13.5px}
.cmp-table th{padding:12px 14px;text-align:left;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);border-bottom:1px solid var(--line)}
.cmp-table th:first-child,.cmp-table td:first-child{padding-left:20px}
.cmp-table td{padding:13px 14px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.cmp-table td.best{background:#eef7ee}
.cmp-price{display:flex;align-items:center;gap:5px;font-weight:600}
td.best .cmp-price{font-weight:700}
.cmp-price .ms{font-size:14px;color:var(--green)}
.cmp-unit{font-size:11.5px;color:var(--pale)}
.cmp-table tfoot td{font-weight:700;background:var(--bg);border-bottom:none}
.cmp-table tfoot td.win{background:var(--tint);color:var(--green-press);font-weight:900}
.legend{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)}
.legend .swatch{width:11px;height:11px;border-radius:3px;background:#eef7ee;border:1px solid var(--green);flex:none}
/* compare cards (mobile) */
.cmp-cards{display:none;flex-direction:column;gap:12px}
.cmp-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.cmp-card .ctitle{padding:12px 15px 10px;font-size:14px;font-weight:700;border-bottom:1px solid var(--line-soft)}
.cmp-card .crow{display:flex;align-items:center;gap:8px;padding:9px 15px;border-bottom:1px solid var(--row);font-size:13px}
.cmp-card .crow.best{background:#eef7ee}
.cmp-card .crow .store{flex:1;font-weight:600;color:#3f5c3f}
.cmp-card .crow .unit{font-size:11.5px;color:var(--pale);flex:1;text-align:right}
.cmp-card .crow .price{width:auto;min-width:64px;text-align:right;font-weight:600;white-space:nowrap}
.cmp-card .crow.best .price{font-weight:700}
.cmp-card .crow .ms{font-size:15px;color:var(--green);width:16px;text-align:right}

/* ---------- mobile ---------- */
@media (max-width:760px){
  .pp-header{padding:12px 16px}
  .steps{gap:10px}
  .step span.lbl{display:none}
  .step.active span.lbl{display:inline}
  .conn{width:18px}
  .pp-header .side{min-width:0}
  .loc-page{padding:56px 20px 64px}
  .list-page{grid-template-columns:1fr;padding:20px 16px 120px;gap:14px}
  .list-side{display:none}
  .list-main .tipbox{display:block}
  .mobile-cta{display:flex;flex-direction:column;gap:8px;position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:12px 16px calc(12px + env(safe-area-inset-bottom));z-index:15}
  .mobile-cta .meta{font-size:12.5px;color:var(--muted)}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
  .working-page,.results-pane{padding:20px 16px 48px}
  .tabs{padding:0 16px;gap:20px}
  .plan-grid{grid-template-columns:1fr}
  .plan-total{font-size:36px}
  .cmp-table{display:none}
  .cmp-cards{display:flex}
  .add-row .btn{padding:0 18px}
  .notify-row{flex-direction:column}
  .notify-row .btn{width:100%}
}
@media print{
  .pp-header,.tabs,.legend,.mobile-cta{display:none}
  body{background:#fff}
  .card{border-color:#ccc}
}
