:root {
  --ink:#172e28; --muted:#50665d; --rule:#d7dfd5; --paper:#f5f7f1; --green:#245942; --white:#fff;
  font-family:Inter,"Segoe UI",Arial,sans-serif; color:var(--ink); background:var(--paper);
}
* {box-sizing:border-box}
body {margin:0; min-height:100vh}
.bar {border-bottom:1px solid var(--rule); background:#fbfcf8}
.bar-inner {width:min(1080px,calc(100% - 64px)); margin:auto; min-height:68px; display:flex; justify-content:space-between; align-items:center}
.brand {display:flex; align-items:center; gap:10px; font-size:15px; letter-spacing:.13em; font-weight:750}
.brand-text {display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 12px}
.brand-text > span {font-size:14px; font-weight:500; letter-spacing:.01em; color:var(--muted)}
.mark {position:relative; width:25px; height:24px; background:var(--green); clip-path:polygon(45% 0,60% 0,100% 100%,72% 100%,53% 48%,29% 100%,0 100%)}
button,input,select {font:inherit}
button {cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {outline:3px solid #83a779; outline-offset:3px}
.quiet {background:transparent; color:var(--muted); border:0; font-size:14px; padding:12px 0 12px 12px}
.quiet:hover,.supplier-link:hover {color:#173c2b;text-decoration:underline}
.dashboard {max-width:1080px; width:calc(100% - 64px); margin:44px auto}
h1,h2,h3,p {margin:0}
h1 {font-weight:620; font-size:clamp(38px,5.2vw,64px); letter-spacing:-.055em; line-height:1.06}
.intro {margin-top:14px; color:var(--muted); line-height:1.55; font-size:16px}
.supplier {margin-top:12px; background:var(--white); border:1px solid var(--rule); border-radius:12px; overflow:hidden}
.offer,.meta {padding:25px 32px}
.disclosure {list-style:none; display:flex; gap:16px; align-items:center; cursor:pointer; padding:16px 26px}
.disclosure::-webkit-details-marker {display:none}
.disclosure::after {content:""; width:8px; height:8px; border:solid var(--green); border-width:0 2px 2px 0; transform:rotate(45deg); margin:-4px 2px 0 auto; flex:none}
.disclosure:hover {background:#f1f5ee}
.disclosure:focus-visible {outline-offset:-4px}
details[open] > .disclosure {border-bottom:1px solid var(--rule)}
details[open] > .disclosure::after {transform:rotate(225deg); margin-top:4px}
.disclosure h2 {font-size:clamp(19px,2.5vw,24px)}
.supplier-heading {display:grid; grid-template-columns:auto minmax(0,1fr) auto 10px; row-gap:4px}
.supplier-heading::after {grid-column:4; grid-row:1/3}
.supplier-info {display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px}
.supplier-summary {grid-column:1/3; grid-row:2; color:var(--muted); font-size:13px; line-height:1.5}
.supplier-summary time {white-space:nowrap}
.price-warning {color:#944312}
.supplier-download {grid-column:3; grid-row:1/3; display:grid; justify-items:end; gap:3px}
.supplier-download small {font-size:12px; color:var(--muted)}
.bundle-link {gap:9px; text-decoration:none; white-space:nowrap}
.bundle-link span {font-size:17px; line-height:1}
.supplier-state {color:var(--green); font-size:13px; font-weight:600}
.supplier-state:empty {display:none}
h2 {font-size:clamp(26px,3vw,32px); font-weight:650; letter-spacing:-.045em}
.category + .category {border-top:1px solid var(--rule)}
.supplier-link {color:var(--ink); font-size:19px; font-weight:600; text-decoration:none}
.external-arrow {display:inline-block; position:relative; width:8px; height:8px; margin-left:2px; vertical-align:3px; color:var(--green); border-top:1.5px solid; border-right:1.5px solid}
.external-arrow::after {content:""; position:absolute; width:10px; right:0; top:0; border-top:1.5px solid; transform-origin:right top; transform:rotate(-45deg)}
.region,.unit,.meta {color:var(--muted)}
.region,.unit {font-size:14px}
.unit {display:block; margin-top:4px}
.category-title {align-self:center}
.price-filter {margin-top:12px}
.price-filter input {width:100%; max-width:170px; font-variant-numeric:tabular-nums}
.offer {display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:end; gap:24px}
label {font-weight:600; font-size:14px; display:block; margin-bottom:8px}
.setting {display:flex; flex-wrap:wrap; align-items:center; gap:10px}
input,select {color:var(--ink); border:1px solid #a8b7ab; border-radius:7px; min-height:44px; padding:10px 12px; background:var(--white)}
.amount {position:relative; width:95px}
.amount input {width:100%; padding-right:26px; font-variant-numeric:tabular-nums}
.amount span {color:var(--muted); position:absolute; right:10px; top:12px; pointer-events:none}
.primary,.secondary {display:inline-flex; align-items:center; justify-content:center; border-radius:7px; font-weight:600; border:1px solid transparent; padding:0 17px; min-height:44px; font-size:14px}
.primary {background:var(--green); color:white}
.primary:hover {background:#1a4532}
.primary:disabled {cursor:default; color:#5a675e; background:#e2e8e0}
.secondary {color:var(--ink); border-color:var(--rule); background:var(--white)}
.secondary:hover {background:#f1f5ee}
.secondary:disabled {color:var(--muted); background:#f1f5ee; cursor:default}
.schedule {margin:24px 0 18px; background:#fbfcf8; border:1px solid var(--rule); border-radius:12px; overflow:hidden}
.schedule-body {padding:18px 26px}
.supplier-settings {padding:16px 26px; background:#fbfcf8; border-bottom:1px solid var(--rule)}
.schedule-top,.schedule-fields,.supplier-settings {display:flex; align-items:end; flex-wrap:wrap; gap:14px 20px}
.schedule-top {justify-content:space-between; align-items:center}
.schedule-fields {margin-top:16px}
.next-update {margin-top:14px; color:var(--muted); font-size:14px}
.activity {margin-top:18px; padding-top:16px; border-top:1px solid var(--rule); font-size:14px; line-height:1.45}
.activity h3 {font-size:17px}
.activity-running,.activity-queue ul {list-style:none; padding:0; margin:0}
.activity-running li,.activity-queue,.activity-alert,.activity-idle {margin-top:9px}
.activity-item {display:flex; flex-wrap:wrap; align-items:center; gap:3px 10px}
.activity-dot {width:9px; height:9px; border-radius:50%; background:var(--green)}
.activity-item .activity-link {font-weight:650}
.activity-link {color:var(--ink); text-decoration:underline; text-decoration-color:#adc1ae; text-underline-offset:3px}
.activity-link:hover {color:var(--green); text-decoration-color:currentColor}
.activity-stage {font-weight:600; color:var(--green)}
.activity-metrics,.activity-last {font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums}
.activity-metrics {margin:3px 0 0 19px}
.activity-last {margin-top:8px}
.activity-queue summary {width:fit-content; cursor:pointer; font-weight:600}
.activity-queue ul {padding:4px 0 0 18px}
.queue-supplier {margin-top:8px; font-weight:600}
.activity-queue li {margin:3px 0}
.activity-alert,.activity-warning {color:#78411e}
.activity-warning {margin-top:8px; font-size:14px}
@media (prefers-reduced-motion:no-preference) {
  .activity-dot {animation:collecting 2s ease-in-out infinite}
  @keyframes collecting {50% {opacity:.45}}
}
.status-stale .activity-dot {animation:none; background:var(--muted)}
.interval input {width:82px}
.category-controls {display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:22px; padding:22px 32px}
.category-controls .offer {padding:0}
.refresh-one .secondary {padding-inline:12px}
.download {gap:14px}
.download span {font-size:19px; line-height:1}
.meta {display:flex; flex-wrap:wrap; align-items:center; gap:12px 26px; background:#f8faf6; border-top:1px solid var(--rule); padding-block:14px; min-height:42px; font-size:13px; font-variant-numeric:tabular-nums}
.meta strong {color:var(--ink); font-weight:600}
.dot {display:inline-block; height:8px; width:8px; border-radius:50%; background:#3f815c; margin-right:5px}
.status,.notice {font-size:14px; line-height:1.55}
.status {padding:14px 32px; background:#f4f7ed; overflow-wrap:anywhere}
.status details {margin-top:4px}
.status details summary {cursor:pointer}
.notice {padding:12px 16px; margin:18px 0 0; border:1px solid #c9dac5; border-radius:7px; background:#eaf4e7}
.problem {color:#764125; background:#fcf3e8; border-color:#ebd2bb}
.login {margin:clamp(52px,10vh,130px) auto 45px; border:1px solid var(--rule); border-radius:15px; width:min(445px,calc(100% - 32px)); padding:36px; background:var(--white)}
.login h1 {font-size:42px}
.login .intro {font-size:15px; margin-top:10px; overflow-wrap:anywhere}
.login-form {margin-top:28px}
.login-form>input:not([type=hidden]) {width:100%; margin-bottom:17px}
.remember-login {display:flex; align-items:center; gap:9px; width:fit-content; min-height:24px; cursor:pointer}
.remember-login input {width:18px; height:18px; min-height:0; margin:0; padding:0; flex:none; accent-color:var(--green)}
.login-button {width:100%; margin-top:8px}
.auth-links,.account-nav {display:flex; align-items:center; gap:16px; flex-wrap:wrap}
.auth-links {margin-top:18px; justify-content:space-between}
.auth-links a,.account-nav a {color:var(--green); font-size:14px}
.auth-links .quiet {padding:0}
.login-form .notice {margin:0 0 10px}
.users-table {margin-top:24px; overflow-x:auto}
.users-table table {width:100%; min-width:560px; border-collapse:collapse; font-size:14px; line-height:1.5}
.users-table th,.users-table td {padding:14px 18px; text-align:left; overflow-wrap:anywhere}
.users-table th {background:#f1f5ee}
.users-table td {border-top:1px solid var(--rule); vertical-align:top}
.users-table td:last-child {white-space:nowrap; font-variant-numeric:tabular-nums}
.stats-link {color:var(--green); font-weight:600; text-underline-offset:3px}
.user-stats > h1 {margin-top:16px; overflow-wrap:anywhere}
.user-stats > section {margin-top:32px}
.user-stats .intro {margin-top:8px; font-size:14px; overflow-wrap:anywhere}
.stats-table {margin-top:12px}
.stats-table table {min-width:100%}
.stats-table tbody th {background:transparent; border-top:1px solid var(--rule); font-weight:550}
.stats-table th:not(:first-child),.stats-table td:not(:first-child) {text-align:right; font-variant-numeric:tabular-nums}
.stats-history {margin-top:12px}
.stats-history .stats-table {margin-top:0; background:var(--white)}
.stats-history h3 {font-size:15px; font-weight:600}
.stats-history h3 span {color:var(--muted); font-weight:400}
.lookup {max-width:660px}
.lookup label {font-size:clamp(22px,3vw,30px); letter-spacing:-.03em; margin-bottom:12px}
.lookup-controls {display:flex; gap:10px}
.lookup-controls input {min-width:0; flex:1}
#price-results {width:min(940px,calc(100% - 32px)); max-height:85vh; max-height:85dvh; padding:0; border:1px solid var(--rule); border-radius:15px; color:var(--ink); box-shadow:0 18px 64px #172e2833}
#price-results[open] {display:flex; flex-direction:column}
#price-results::backdrop {background:#172e2866}
.results-heading {display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-bottom:1px solid var(--rule)}
.results-heading h2,.search-page h1 {font-size:clamp(21px,3vw,28px); letter-spacing:-.035em}
.search-page {background:var(--white); border:1px solid var(--rule); border-radius:15px}
.search-page a,.search-pages a {text-decoration:none}
#search-output {padding:18px 24px; overflow:auto; overscroll-behavior:contain; min-height:3.5em}
.search-page > :not(header) {margin:18px 24px}
.search-summary,.search-message {font-size:15px; line-height:1.5; overflow-wrap:anywhere}
.search-summary,.search-pages {color:var(--muted)}
.matches {width:100%; margin-top:14px; border-spacing:0; font-size:14px; line-height:1.45}
.search-page .matches {width:calc(100% - 48px)}
.matches th,.matches td {padding:12px 10px; text-align:left; vertical-align:top}
.matches th {background:#f1f5ee; font-size:13px}
.matches td {border-bottom:1px solid var(--rule); overflow-wrap:anywhere}
.matches th:last-child,.matches .match-price {text-align:right}
.match-article {width:15%; font-variant-numeric:tabular-nums}
.match-supplier {width:23%}
.match-supplier strong,.match-name {font-weight:600}
.match-name a {color:var(--green); text-underline-offset:3px}
.match-price {width:16%; white-space:nowrap; font-weight:650; font-variant-numeric:tabular-nums}
.matches small {display:block; color:var(--muted); font-size:12px; font-weight:400}
.mobile-label {display:none}
.search-pages {display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:16px; font-size:14px}
.search-pages span {margin-right:auto}
@media(max-width:640px) {
  .results-heading,#search-output {padding:16px}
  .matches,.matches tbody {display:block}
  .matches thead {position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden}
  .matches tr {display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:12px 0; border-top:1px solid var(--rule)}
  .matches td {border:0; width:auto; padding:0}
  .match-name {grid-column:1/-1; grid-row:1}
  .match-article {grid-column:1; grid-row:2; color:var(--muted)}
  .match-supplier {grid-column:1; grid-row:3}
  .match-price {grid-column:2; grid-row:2/4}
  .mobile-label {display:inline}
}
@media(max-width:760px) {
  .bar-inner,.dashboard {width:calc(100% - 32px)}
  .bar-inner {min-height:56px}
  .dashboard {margin:40px auto}
  .offer {padding:20px}
  .disclosure {padding:15px 18px; gap:10px}
  .supplier-heading {row-gap:4px}
  .supplier-info {gap:3px 10px}
  .region {font-size:12px}
  .offer {grid-template-columns:1fr; align-items:stretch; gap:16px}
  .schedule-body,.category-controls {padding:18px 20px}
  .schedule-fields > div {flex:1 1 140px}
  .schedule-fields input,.schedule-fields select {width:100%}
  .supplier-settings {gap:12px; padding:16px 20px}
  .category-controls {grid-template-columns:auto minmax(0,1fr); gap:14px; align-items:center}
  .category-controls .offer {display:contents}
  .category-controls .discount,.category-controls .download {grid-column:1/-1}
  .meta,.status {padding:14px 20px}
  .meta {gap:6px 18px}
  .login {padding:26px}
}
@media(max-width:540px) {
  .brand-text {display:grid; gap:0}
  .brand-text > span {font-size:12px}
  .supplier-heading {grid-template-columns:minmax(0,1fr) auto 10px}
  .supplier-info {display:contents}
  .supplier-info .region {grid-column:2; grid-row:1}
  .supplier-state {grid-column:1/-1}
  .supplier-summary {grid-column:1/-1}
  .supplier-heading::after {grid-column:3; grid-row:1}
  .supplier-download {grid-column:1/-1; grid-row:auto; justify-self:end}
}
