:root {
  color-scheme: light;
  --ink: #172c2a;
  --muted: #4d625d;
  --teal: #146653;
  --teal-dark: #0e5041;
  --pale: #e6f2e9;
  --cream: #f8f7f1;
  --white: #fff;
  --border: #d9e1da;
  --error: #9c3b2e;
  --heading: Georgia, Cambria, serif;
  --radius: 12px;
  --shadow: 0 8px 28px rgb(33 56 49 / .07);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1e8069; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(2.5rem, 5.7vw, 4rem)/1.02 var(--heading); letter-spacing: -.045em; }
h2 { font: 400 1.85rem/1.12 var(--heading); letter-spacing: -.025em; }
label { display: block; font-size: .84rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .72rem .8rem;
}
label > input, label > select, label > textarea { display: block; margin-top: .36rem; }
input::placeholder, textarea::placeholder { color: #60726b; opacity: 1; }
textarea { resize: vertical; }
svg.icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  flex: none;
}
.sprite { position: absolute; overflow: hidden; }
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 9;
  top: 1rem;
  left: 1rem;
  padding: .6rem 1rem;
  background: var(--white);
  color: var(--teal);
  border-radius: 8px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .13em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #479b79;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .54rem;
  min-height: 42px;
  padding: .6rem .92rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .87rem;
  font-weight: 680;
  line-height: 1.2;
  text-decoration: none;
}
.primary { color: var(--white); background: var(--teal-dark); }
.primary:not(:disabled):hover { background: #0a3d32; }
.link-button {
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  padding: .28rem .16rem;
  font-size: .78rem;
  font-weight: 670;
}
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 1.1rem;
}
.icon-button:hover { color: var(--teal-dark); background: var(--pale); }
.brand { display: inline-flex; align-items: center; gap: .64rem; flex: none; white-space: nowrap; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #d6f5e2;
  background: var(--teal-dark);
  font-size: 1.26rem;
}
.brand strong { display: block; font: 700 1.47rem/.95 var(--heading); letter-spacing: .09em; }
.brand small { display: block; margin-top: .26rem; font-size: .57rem; font-weight: 760; line-height: 1; letter-spacing: .14em; }
.brand-inverse { color: var(--white); }
.brand-inverse .brand-mark { color: var(--teal-dark); background: #cfebd8; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  min-height: 100svh;
}
.login-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
  min-height: 620px;
  padding: clamp(2rem, 6vw, 5.25rem);
  color: #f8fbf4;
  background: radial-gradient(ellipse at 100% 100%, #28614e, transparent 65%), #163e35;
}
.login-story::before, .login-story::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -12rem -21rem auto;
  width: 40rem;
  height: 40rem;
  pointer-events: none;
  border: 1px solid rgb(211 245 219 / .22);
  border-radius: 15%;
  transform: rotate(-30deg);
}
.login-story::after { right: -7rem; bottom: -26rem; }
.login-story-body { max-width: 550px; }
.story-eyebrow { margin-bottom: 1.15rem; color: #c0e5cc; }
.story-eyebrow > span { background: #a6d3a8; }
.login-story h1 { font-size: clamp(3.1rem, 6vw, 6.15rem); }
.login-story-body > p { max-width: 34ch; margin-top: 1.25rem; font-size: clamp(.98rem, 1.8vw, 1.2rem); color: #d3e8da; }
.login-story-foot { display: flex; align-items: center; gap: .55rem; font-size: .8rem; color: #d3e8da; }
.login-panel { display: grid; place-items: center; padding: clamp(1.5rem, 5vw, 4rem); }
.login-inner { width: min(100%, 390px); }
.login-inner > .eyebrow { margin-bottom: .55rem; }
.login-inner h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
.login-inner form > p:not(.form-error):not(.field-hint) { margin-top: .55rem; color: var(--muted); font-size: .94rem; }
.login-inner label { margin-top: 1rem; }
.login-submit { margin-top: 1.25rem; width: 100%; justify-content: space-between; }
.login-help { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; }
.form-error { color: var(--error); margin-top: .8rem; font-size: .84rem; }
.form-error:empty { margin: 0; }
.field-hint { margin: .38rem 0 .95rem; font-size: .79rem; color: var(--muted); }

#portal { display: flex; flex-direction: column; min-height: 100svh; }
.shell { width: min(100% - 3rem, 1280px); margin-inline: auto; }
.top { background: var(--white); border-bottom: 1px solid var(--border); }
.top-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.4rem; min-height: 73px; }
.navigation { display: flex; justify-content: center; align-items: center; align-self: stretch; gap: .2rem; }
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: .46rem;
  min-height: 42px;
  padding: .6rem .85rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 650;
  white-space: nowrap;
}
.nav-button:hover, .nav-button[aria-current="page"], .nav-button[aria-selected="true"], .nav-button.active {
  color: var(--teal-dark);
  background: var(--pale);
}
.account { display: flex; align-items: center; gap: .82rem; }
.account-text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
#customer { overflow: hidden; max-width: 22ch; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 700; }
#signout { padding: 0 .08rem; font-size: .71rem; }
.top-cart { white-space: nowrap; }
#cart-count {
  display: grid;
  min-width: 1.4rem;
  min-height: 1.4rem;
  place-items: center;
  padding-inline: .24rem;
  border-radius: 999px;
  background: #d9ecdf;
  color: var(--teal-dark);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}
.main { flex: 1; padding-block: clamp(1.5rem, 3.5vw, 3rem) 3rem; }
.catalog-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  min-height: 145px;
  padding: clamp(1.15rem, 3vw, 2.1rem);
  border: 1px solid #d8e7da;
  border-radius: 16px;
  background: linear-gradient(116deg, #e1f0e3, #edf4e6 73%, #e4efe2);
}
.intro-label { margin-bottom: .48rem; }
.intro-copy, .view-heading > p:last-child { margin-top: .6rem; color: var(--muted); font-size: .97rem; }
.mila-card {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  flex: none;
  min-height: 76px;
  padding: .68rem .8rem;
  text-align: left;
  border: 1px solid #d2e2d4;
  border-radius: 11px;
  background: #f9fcf6;
  box-shadow: 0 3px 9px rgb(33 56 49 / .035);
}
.mila-card:hover { background: var(--white); border-color: #a7cdb6; }
.mila-avatar { flex: none; width: 52px; height: 52px; object-fit: cover; object-position: center 35%; border-radius: 50%; background: var(--pale); }
.mila-intro { display: grid; gap: .15rem; }
.mila-intro strong { font-size: .95rem; }
.mila-intro small { color: var(--muted); font-size: .74rem; }
.mila-arrow { margin-left: .28rem; color: var(--teal-dark); }
.catalog-tools {
  display: grid;
  gap: .72rem;
  margin-top: 1rem;
  padding: .95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.search-box { position: relative; }
.search-box .icon { position: absolute; inset: 50% auto auto .85rem; transform: translateY(-50%); color: var(--teal); font-size: 1rem; pointer-events: none; }
.search-box > input { min-height: 49px; margin: 0; padding-inline: 2.6rem .85rem; background: #f9fbf8; font-size: .95rem; font-weight: 500; }
.filter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; gap: .7rem; }
.filter-row label { color: var(--muted); font-size: .75rem; }
.filter-row select {
  height: 40px;
  margin-top: .2rem;
  padding: .4rem .5rem;
  font-size: .86rem;
  font-weight: 580;
}
.clear-filters { min-height: 40px; padding-inline: .35rem; white-space: nowrap; }
.categories { display: flex; flex-wrap: wrap; gap: .44rem; margin-top: .9rem; }
.categories:empty { display: none; }
.categories button, .mila-prompts button, .pagination button {
  min-height: 34px;
  padding: .36rem .69rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--white);
  font-size: .75rem;
  font-weight: 650;
}
.categories button:hover, .mila-prompts button:hover, .pagination button:not(:disabled):hover,
.categories button.active, .categories button[aria-pressed="true"], .pagination button[aria-current="page"] {
  background: var(--pale);
  border-color: #a9c9b6;
}
.result-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-block: 1.55rem .72rem; }
.result-bar h2 { font-size: 1.61rem; }
#count { color: var(--muted); font-size: .82rem; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .76rem; }
.product {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .46rem;
  min-width: 0;
  min-height: 172px;
  padding: .85rem .93rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.product:hover { border-color: #9dbca9; }
.product-category { color: var(--teal); font-size: .64rem; font-weight: 760; text-transform: uppercase; letter-spacing: .10em; }
.product-copy { flex: 1; min-width: 0; }
.product-name { margin-block: .22rem .35rem; color: var(--ink); font-size: .98rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.product-meta { display: flex; flex-wrap: wrap; gap: .15rem .5rem; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.product-pricing { margin-right: auto; line-height: 1.2; }
.product-price { color: var(--ink); font-size: .96rem; font-weight: 720; white-space: nowrap; font-variant-numeric: tabular-nums; }
.product-unit { font-size: .72rem; font-weight: 550; color: var(--muted); white-space: nowrap; }
.product-controls { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .3rem; }
.product-controls input { width: 4.25rem; padding: .3rem .35rem; min-height: 36px; font-size: .82rem; }
.product .add {
  min-height: 36px;
  padding: .35rem .68rem;
  border: 1px solid #bcd5c3;
  border-radius: 8px;
  background: var(--pale);
  color: var(--teal-dark);
  font-size: .81rem;
  font-weight: 720;
}
.product .add:not(:disabled):hover { background: #d5e9da; }
.pagination { display: flex; justify-content: center; align-items: center; gap: .55rem; margin-top: 1.1rem; }
.pagination:empty, .catalog-date:empty { display: none; }
.pagination-label { color: var(--muted); font-size: .77rem; }
.catalog-date { margin-top: 1rem; text-align: center; color: var(--muted); font-size: .75rem; }
.empty-state, .results > p, .orders > p {
  grid-column: 1 / -1;
  padding: 1.25rem;
  border: 1px dashed #bccdc1;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfcf9;
}
.empty-state { display: flex; align-items: center; gap: .68rem; }
.portal-footer { padding-block: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .74rem; }
.portal-footer > .shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; }
.portal-footer span:first-child { font-weight: 750; color: var(--teal-dark); }

.view-heading { margin-bottom: 1.35rem; }
.view-heading .eyebrow { margin-bottom: .4rem; }
.utility-panel { max-width: 680px; padding: 1.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
#quick-form textarea { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .9rem; }
#quick-results:not(:empty) { margin-top: 1rem; color: var(--muted); font-size: .87rem; }
.orders { display: grid; gap: .7rem; }
.orders article, .orders > details { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); overflow-wrap: anywhere; }
.orders h2, .orders h3 { margin-bottom: .35rem; font-size: 1rem; font-family: inherit; font-weight: 700; }
.orders p { color: var(--muted); font-size: .88rem; }
.order-title { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .7rem; cursor: pointer; font-size: .85rem; }
.order-title::before { content: "▸"; color: var(--teal-dark); }
.order-details[open] .order-title::before { content: "▾"; }
.order-title > strong { margin-right: auto; }
.order-status { padding: .24rem .55rem; border-radius: 99px; background: var(--pale); color: var(--teal-dark); font-size: .73rem; font-weight: 650; }
.order-date { margin-top: .55rem; }
.order-lines { margin-block: .4rem .7rem; padding-left: 1.1rem; color: var(--muted); font-size: .82rem; }
.order-card > button { margin-top: .7rem; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 500px);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.drawer[open] { display: flex; flex-direction: column; }
body:has(.drawer[open]) { overflow: hidden; }
.drawer::backdrop { background: rgb(11 35 30 / .53); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); background: var(--white); }
.drawer-head .eyebrow { margin-bottom: .12rem; }
.drawer-body { flex: 1; min-height: 0; padding: 1rem 1.15rem; overflow: auto; }
.cart-items { display: grid; gap: .55rem; }
.cart-items > div, .cart-items > article, .cart-items > p {
  padding: .8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  font-size: .86rem;
}
.cart-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem .65rem; }
.cart-line-identity { min-width: 0; flex: 1 1 11rem; display: grid; gap: .12rem; overflow-wrap: anywhere; }
.cart-line-identity small { color: var(--muted); }
.cart-line-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.cart-line-total { min-width: 4.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.cart-items button, .mila-messages button, .orders button {
  min-height: 34px;
  padding: .3rem .55rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--teal-dark);
  background: var(--white);
  font-size: .77rem;
  font-weight: 650;
}
.cart-items button:hover, .mila-messages button:hover, .orders button:hover { background: var(--pale); }
.cart-items input { width: 4.5rem; min-height: 34px; padding: .3rem .35rem; }
.cart-summary { display: flex; justify-content: space-between; gap: .6rem; margin-block: .75rem 1rem; padding-block: .72rem; border-block: 1px solid var(--border); font-size: .91rem; }
.cart-summary strong { font-variant-numeric: tabular-nums; }
#checkout-form label { margin-bottom: .85rem; }
.optional { color: var(--muted); font-size: .71rem; font-weight: 500; }
.checkout-submit { width: 100%; justify-content: space-between; }
#order-message:not(:empty) { margin-top: .7rem; color: var(--muted); font-size: .83rem; }
.assistant-identity { display: flex; align-items: center; gap: .65rem; }
.assistant-intro { color: var(--muted); font-size: .92rem; }
.mila-prompts { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .65rem .8rem; }
.mila-messages { display: grid; gap: .54rem; }
.mila-message { padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--white); font-size: .88rem; overflow-wrap: anywhere; }
.mila-message p { white-space: pre-line; }
.mila-message.buyer { background: var(--pale); margin-left: 1.5rem; }
.mila-speaker { display: block; margin-bottom: .2rem; color: var(--teal-dark); font-size: .73rem; font-weight: 700; }
.mila-matches:not(:empty) { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.mila-form { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: .52rem; padding: .75rem 1.15rem max(.75rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--white); }
.toast { position: fixed; z-index: 8; right: 1rem; bottom: 1rem; max-width: min(26rem, calc(100vw - 2rem)); padding: .72rem .9rem; border-radius: 9px; color: var(--white); background: var(--teal-dark); box-shadow: var(--shadow); font-size: .87rem; }

@media (max-width: 980px) {
  .top-inner { gap: .65rem; }
  .nav-button { padding-inline: .56rem; }
  #customer { max-width: 13ch; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  input, select, textarea, #quick-form textarea, .search-box > input, .filter-row select, .product-controls input { font-size: 1rem; }
  .shell { width: min(100% - 1.5rem, 1280px); }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { gap: 1.25rem; min-height: auto; padding: 1.3rem 1.2rem 1.65rem; }
  .login-story h1 { font-size: clamp(2.35rem, 9vw, 3.2rem); }
  .login-story-body > p { margin-top: .55rem; font-size: .91rem; }
  .story-eyebrow { margin-bottom: .48rem; }
  .login-story-foot { display: none; }
  .login-panel { padding: 1.6rem 1rem 2rem; }
  .top-inner { grid-template-columns: 1fr auto; gap: .32rem .5rem; min-height: 0; padding-block: .62rem .43rem; }
  .account { grid-column: 2; grid-row: 1; gap: .42rem; }
  .navigation { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .nav-button { font-size: .76rem; }
  .top-cart { min-height: 39px; gap: .36rem; padding-inline: .54rem; font-size: .75rem; }
  .account-text { align-items: flex-end; }
  #customer { max-width: 11ch; font-size: .72rem; }
  .catalog-intro { flex-wrap: wrap; min-height: 0; gap: .75rem; }
  .mila-card { min-height: 56px; padding: .4rem .55rem; }
  .mila-card .mila-avatar { width: 40px; height: 40px; }
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .48rem .6rem; }
  .clear-filters { grid-column: 1 / -1; justify-self: start; min-height: 35px; }
  .main { padding-top: 1rem; }
}
@media (max-width: 480px) {
  .nav-button { gap: .35rem; padding-inline: .48rem; }
  .results { grid-template-columns: 1fr; gap: .55rem; }
  .product { min-height: 0; }
  .order-title > strong { flex-basis: calc(100% - 1.25rem); }
  .order-title > .order-status { margin-left: 1rem; margin-right: auto; }
  .catalog-tools { padding: .65rem; }
  .portal-footer > .shell { flex-direction: column; }
  .brand-mark { width: 34px; height: 34px; }
  .brand { gap: .44rem; }
  .brand strong { font-size: 1.25rem; }
}
