:root{
  --navy:#0f2747; --navy2:#173a63; --gold:#c9a227; --gold2:#e0be4d;
  --bg:#f4f6f9; --card:#fff; --ink:#1c2430; --muted:#6b7787;
  --line:#e2e7ee; --ok:#1e874b; --okbg:#e6f6ec; --err:#b3261e; --errbg:#fbe9e7;
  --warn:#a86a00; --warnbg:#fff4de;
  --topbar-h:56px;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--ink);font-size:15px;line-height:1.45}
a{color:var(--navy2);text-decoration:none}
a:hover{text-decoration:underline}
.topbar{background:var(--navy);color:#fff;display:flex;align-items:center;
  padding:0 18px;height:56px;gap:6px;position:sticky;top:0;z-index:50}
.topbar .brand{font-weight:700;font-size:18px;color:#fff;margin-right:18px;white-space:nowrap}
.topbar .brand b{color:var(--gold2)}
.topbar nav{display:flex;gap:2px;flex-wrap:wrap;flex:1}
.topbar nav a{color:#dbe4f0;padding:8px 12px;border-radius:7px;font-size:14px}
.topbar nav a:hover{background:var(--navy2);text-decoration:none;color:#fff}
.topbar nav a.active{background:var(--gold);color:var(--navy);font-weight:600}

/* --- grouped nav ---------------------------------------------------------
   Each group is a <details>/<summary>, so it works with no JavaScript, is
   keyboard-operable for free, and turns into an accordion inside the mobile
   menu without a second implementation. */
.topbar nav{display:flex;align-items:center;gap:2px}
.navgroup{position:relative}
.navgroup > summary{
  list-style:none;cursor:pointer;color:#dbe4f0;padding:8px 12px;border-radius:7px;
  font-size:14px;white-space:nowrap;user-select:none;display:flex;align-items:center;gap:5px;
}
.navgroup > summary::-webkit-details-marker{display:none}
.navgroup > summary::after{content:"▾";font-size:10px;opacity:.6}
.navgroup > summary:hover{background:var(--navy2);color:#fff}
.navgroup > summary.active{background:var(--gold);color:var(--navy);font-weight:600}
.navgroup > summary:focus-visible{outline:2px solid var(--gold2);outline-offset:1px}
.navgroup[open] > summary{background:var(--navy2);color:#fff}
.navgroup[open] > summary.active{background:var(--gold);color:var(--navy)}
.navmenu{
  position:absolute;top:calc(100% + 4px);left:0;z-index:60;min-width:190px;
  background:var(--navy);border:1px solid rgba(255,255,255,.16);border-radius:9px;padding:5px;
  box-shadow:0 12px 32px rgba(0,0,0,.45);display:flex;flex-direction:column;gap:1px;
}
.navmenu.align-right{left:auto;right:0}
.navmenu a{
  color:#dbe4f0;padding:8px 11px;border-radius:6px;font-size:14px;white-space:nowrap;
}
.navmenu a:hover{background:var(--navy2);text-decoration:none;color:#fff}
.navmenu a.here{background:var(--gold);font-weight:600;color:var(--navy)}
.navgroup.right-group{margin-left:auto}
.navgroup.right-group > summary::after{content:""}
.navgroup.right-group > summary{padding:6px 11px}
/* The gear keeps its words where there is room for them; on a narrower desk
   the words go and the symbol stays, rather than the bar wrapping onto a
   second line over the page. The phone menu always has room. */
@media(min-width:861px) and (max-width:1500px){.gear-words{display:none}.navgroup.right-group > summary{font-size:17px}}
@media(min-width:861px) and (max-width:1300px){
  /* And the right-hand corner gives up what it can: the name is on every
     page's Log out anyway, and the scan box needs less room than a sentence. */
  .topbar .right .who{display:none}
  .topbar .right #globalscan{width:110px !important}
  .topbar .right{gap:8px}
}

.topbar .right{margin-left:auto;display:flex;align-items:center;gap:12px;font-size:13px;color:#cdd8e6}
/* The back arrow at the head of the bar. Same weight as the menu button, so
   the two corners of the bar match; hidden with the attribute rather than a
   class so it is invisible before back.js has run. */
.backbtn{display:inline-flex;align-items:center;justify-content:center;
  background:transparent;border:0;color:#fff;font-size:22px;line-height:1;
  padding:6px 10px;margin-right:2px;border-radius:7px;cursor:pointer}
.backbtn:hover{background:var(--navy2)}
.backbtn[hidden]{display:none}
.navtoggle{display:none;background:transparent;border:0;color:#fff;font-size:24px;line-height:1;
  padding:6px 10px;margin-left:auto;cursor:pointer;border-radius:7px}
.navtoggle:hover{background:var(--navy2)}
@media(max-width:860px){
  /* Shut, the bar is one 56px line and nothing more. It used to GROW when you
     opened the menu — six groups, the scan box, the language switch and the log
     out link all stacked inside a sticky bar, which shoved the page most of
     the way off a phone screen and left the pinned page heading sitting on
     top of it. The bar no longer changes size; the menu opens over the page
     instead of pushing it. */
  .topbar{flex-wrap:wrap;height:56px;padding:0 14px;overflow:hidden;
    transition:transform .2s ease}
  .navtoggle{display:block;font-size:22px;padding:8px 10px}
  .topbar nav{display:none;order:5;flex-basis:100%;flex-direction:column;gap:2px;margin-top:6px}
  .topbar .right{display:none;order:6;flex-basis:100%;flex-direction:column;align-items:stretch;
    gap:10px;margin-left:0;margin-top:6px;padding-top:10px;border-top:1px solid rgba(255,255,255,.12)}

  /* Open: a panel hanging off the top of the screen, only as tall as it needs
     to be, scrolling itself if the list is longer than the phone. */
  body.navopen .topbar{
    position:fixed;top:0;left:0;right:0;height:auto;max-height:100%;overflow-y:auto;
    -webkit-overflow-scrolling:touch;align-content:flex-start;
    padding:8px 14px 20px;box-shadow:0 18px 40px rgba(8,16,30,.45)}
  body.navopen .topbar nav,body.navopen .topbar .right{display:flex}
  /* Expand an accordion and the panel can outgrow the phone; the close button
     has to stay where your thumb left it. */
  body.navopen .topbar .brand,body.navopen .topbar .navtoggle{
    position:sticky;top:-8px;z-index:2;background:var(--navy)}
  /* Fixed takes the bar out of the flow, so the page behind would jump up by
     its height the moment you opened the menu. This stands in its place. */
  body.navopen::before{content:"";display:block;height:56px}
  /* Tap anywhere off the menu to shut it, and the page behind holds still
     rather than scrolling under your thumb. */
  body.navopen::after{content:"";position:fixed;inset:0;z-index:45;
    background:rgba(8,16,30,.5)}
  body.navopen{overflow:hidden}

  /* Scrolled down, the bar gets out of the way entirely and comes back the
     moment you scroll up — on a phone it and the pinned heading together were
     eating a fifth of the screen on every page. The heading closes the gap so
     it doesn't float with 56px of nothing above it. */
  body.navhidden .topbar{transform:translateY(-100%)}
  body.navhidden{--topbar-h:0px}
  .topbar nav a{padding:12px 12px;font-size:16px}
  .topbar nav{flex-direction:column;align-items:stretch;gap:2px}
  .navgroup{position:static}
  .navgroup > summary{font-size:16px;padding:12px}
  .navgroup.right-group{margin-left:0}
  .navgroup.right-group > summary::after{content:"▾";font-size:10px;opacity:.6}
  .navmenu{
    position:static;min-width:0;background:transparent;border:0;box-shadow:none;
    padding:2px 0 6px 14px;border-left:2px solid var(--navy2);margin-left:12px;
  }
  .navmenu.align-right{right:auto}
  .navmenu a{color:#dbe4f0;font-size:15px;padding:10px 12px}
  .navmenu a:hover,.navmenu a.here{background:var(--navy2);color:#fff}
  .topbar .right form,.topbar .right #globalscan{width:100%}
  .topbar .right #globalscan{box-sizing:border-box}
  .topbar .langswitch{font-size:15px}
  .topbar .langswitch a{padding:4px 10px !important;font-size:15px !important}
}
/* The whole window, on every page. A 1120px reading column left a third of a
   wide monitor empty while the tables inside it scrolled sideways — on the
   dashboard the shipping table's last columns sat off the edge of a card with
   room to spare on both sides of it. Screens here are worked, not read: a
   table wants the width more than a paragraph wants a short line, and the
   paragraphs that need one carry their own. */
.wrap{max-width:none;margin:10px auto 22px;padding:0 22px}
/* Kept because pages ask for it by name; it is now what every page does. */
.wrap.wide{max-width:none}
/* A field is only as wide as what goes into it. Full-width pages turned
   width:100% into the whole monitor, so a company name sat in a box 2,200px
   across with the cursor alone in the middle of it. A field already narrower —
   one in a table cell, a grid column, or carrying its own width — is untouched,
   and a textarea keeps more room because what goes in one is longer. */
.wrap input:not([type=checkbox]):not([type=radio]),.wrap select{max-width:720px}
.wrap textarea{max-width:1100px}
/* Explanatory text keeps a line you can read back from. A paragraph set across
   the whole monitor runs past 300 characters, and the eye loses its place on
   the way back to the left edge. Tables, forms and lists are unaffected. */
.wrap .card>p{max-width:92ch}
/* The page heading and its buttons stay put while a long list scrolls under
   them — on Customers or Orders the "New customer" button was hundreds of rows
   away once you started reading. Pinned below the topbar, which is itself
   sticky at 56px. */
.page-title{display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;
  position:sticky;top:var(--topbar-h);z-index:40;
  background:var(--bg);margin:0 0 16px;padding:10px 0 12px;
  border-bottom:1px solid var(--line)}
.page-title h1{font-size:22px;margin:0}
.card{background:var(--card);border:1px solid var(--line);border-radius:12px;
  padding:18px;margin-bottom:16px;box-shadow:0 1px 2px rgba(16,32,64,.04)}
.card h2{font-size:16px;margin:0 0 12px}
.grid{display:grid;gap:14px}
.grid.cols-2{grid-template-columns:repeat(2,1fr)}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.grid.cols-4{grid-template-columns:repeat(4,1fr)}
.grid.cols-5{grid-template-columns:repeat(5,1fr)}
@media(max-width:800px){.grid.cols-2,.grid.cols-3,.grid.cols-4,.grid.cols-5{grid-template-columns:1fr}}
/* A grid cell is as narrow as its column, whatever a wide table inside it would
   like: the table scrolls in its own box instead of widening the page. */
.grid>*{min-width:0}
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px}
.stat .n{font-size:26px;font-weight:700;color:var(--navy)}
.stat .l{color:var(--muted);font-size:13px;text-transform:uppercase;letter-spacing:.03em}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top}
th{color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.03em}
tr:hover td{background:#fafbfd}
.btn{display:inline-block;background:var(--navy);color:#fff;border:0;border-radius:8px;
  padding:9px 15px;font-size:14px;cursor:pointer;font-weight:600}
.btn:hover{background:var(--navy2);text-decoration:none;color:#fff}
.btn.gold{background:var(--gold);color:var(--navy)}
.btn.gold:hover{background:var(--gold2);color:var(--navy)}
.btn.ghost{background:#fff;color:var(--navy);border:1px solid var(--line)}
.btn.ghost:hover{background:#f2f5f9;color:var(--navy)}
.btn.sm{padding:5px 10px;font-size:13px}
.btn.danger{background:var(--errbg);color:var(--err)}
label{display:block;font-size:13px;color:var(--muted);margin:10px 0 4px;font-weight:600}
input,select,textarea{width:100%;padding:9px 11px;border:1px solid var(--line);
  border-radius:8px;font-size:14px;font-family:inherit;background:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid var(--gold2);border-color:var(--gold)}
textarea{min-height:70px}
.row{display:flex;gap:12px;flex-wrap:wrap}
.row>div{flex:1;min-width:140px}
.flash{padding:11px 15px;border-radius:9px;margin-bottom:12px;font-size:14px}
.flash.success{background:var(--okbg);color:var(--ok)}
.flash.error{background:var(--errbg);color:var(--err)}
.tag{display:inline-block;padding:2px 9px;border-radius:3px;font-size:12px;font-weight:600}
.tag.gray{background:#eef1f5;color:#5a6673}
.tag.green{background:var(--okbg);color:var(--ok)}
.tag.gold{background:#fbf1cf;color:var(--warn)}
.tag.blue{background:#e5eefb;color:#1a5fb4}
.tag.red{background:var(--errbg);color:var(--err)}
.muted{color:var(--muted)}
.right{text-align:right}
.nowrap{white-space:nowrap}
.banner{background:var(--warnbg);color:var(--warn);border:1px solid #f0d99a;
  padding:12px 16px;border-radius:10px;margin-bottom:16px;font-size:14px}
.toolbar{display:flex;gap:8px;align-items:center;margin-bottom:14px;flex-wrap:wrap}

/* --- where you are in checkout ---------------------------------------------
   Three screens with nothing between them saying so. Numbers rather than
   ticks: a tick claims something was done well, a number only says where you
   are. Colours are the theme's own tokens, so the retail face restyles this
   without a second copy of it. */
.steps{margin:0 0 18px}
.steps ol{list-style:none;display:flex;gap:8px;margin:0;padding:0;flex-wrap:wrap}
.steps li{display:flex;align-items:center;gap:8px;padding:8px 14px 8px 10px;
  border:1px solid var(--line);border-radius:6px;background:var(--card);
  font-size:14px;color:var(--muted);flex:1 1 140px;min-width:0}
.steps .n{display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;border-radius:4px;font-size:13px;font-weight:700;
  background:var(--bg);color:var(--muted);flex:0 0 auto}
.steps .l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.steps li.done{color:var(--ink)}
.steps li.done .n{background:var(--okbg);color:var(--ok)}
.steps li.now{border-color:var(--gold);color:var(--ink);font-weight:600}
.steps li.now .n{background:var(--gold);color:var(--navy)}
/* A theme that gives --gold and --navy one colour must restyle that number, or
   it disappears into its box. nocturne.css does. */
/* Said for a screen reader, never drawn. */
.steps .sr{position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap}
.login-wrap{max-width:380px;margin:8vh auto;padding:0 18px}
.login-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px;
  box-shadow:0 6px 24px rgba(16,32,64,.08)}
.login-card .logo{text-align:center;font-size:24px;font-weight:800;color:var(--navy);margin-bottom:4px}
.login-card .logo b{color:var(--gold)}
.empty{text-align:center;color:var(--muted);padding:34px}
@media print{.topbar,.toolbar,.btn,.no-print{display:none!important}
  .page-title{position:static;border-bottom:0;padding:0}
  body{background:#fff}.card{box-shadow:none;border:0}}
/* The printed form of something edited in a box on screen: an invoice price
   an administrator can change prints as the figure, not as an empty cell. */
.print-only{display:none}
@media print{.print-only{display:inline!important}}


/* ---------------------------------------------------------------------------
   Phones. Josh runs this on a tablet and a phone in the warehouse, so these
   aren't cosmetic: a table that overflows the screen or a button too small to
   hit with a thumb makes the page unusable one-handed.
   --------------------------------------------------------------------------- */
@media(max-width:640px){
  .wrap{margin:14px auto;padding:0 12px}

  /* Title and its buttons stop fighting for one line. Still pinned, but
     tighter — stacked it would otherwise eat a fifth of a phone screen. */
  .page-title{flex-direction:column;align-items:stretch;gap:6px;padding:8px 0}
  .page-title h1{font-size:19px}
  .page-title > div{display:flex;flex-wrap:wrap;gap:6px}

  /* Wide tables scroll inside themselves rather than stretching the page —
     the orders list and line items are far wider than a phone. */
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;
    white-space:nowrap}

  /* ...except a table you have to TYPE INTO. Sideways scrolling is fine for
     reading and hopeless for entry: the quantity box is the last column, so on
     a phone it sat off-screen behind a scroll customers never found. These
     rows become cards, with the quantity a full-width control at the bottom. */
  .ordertable{display:block;overflow:visible;white-space:normal}
  .ordertable thead{display:none}
  .ordertable tbody,.ordertable tr,.ordertable td{display:block;width:100%}
  .ordertable tr{
    border:1px solid var(--line);border-radius:10px;padding:10px 12px;
    margin-bottom:10px;background:var(--card)}
  .ordertable td{border:0;padding:2px 0;text-align:left !important}
  .ordertable td:first-child{font-weight:600;font-size:15px}
  .ordertable td input[type=number]{
    width:100%;font-size:17px;padding:12px;text-align:center;
    margin-top:6px;border-radius:8px}
  th,td{padding:10px 8px}

  /* 16px stops iOS zooming in on focus, which then leaves the page scrolled
     sideways. Everything else here is thumb-size. */
  input,select,textarea{font-size:16px;padding:11px 12px}
  /* The topbar scan box sets its size inline, so only !important reaches it —
     and it's the one field a warehouse phone uses most. */
  .topbar #globalscan{font-size:16px !important;padding:11px 12px !important}
  .btn{padding:11px 16px;font-size:15px;min-height:44px;
    display:inline-flex;align-items:center;justify-content:center}
  /* The menu button is the most-pressed control on a phone and was the
     smallest thing in the bar. */
  .navtoggle{width:44px;height:44px;padding:0;font-size:22px}
  /* A small button is small in its text, not in its target. 44px is the
     smallest square a thumb hits reliably, and more than half the controls on
     the ordering page were under 40. */
  .btn.sm{padding:9px 14px;font-size:14px;min-height:44px;
    display:inline-flex;align-items:center;justify-content:center}
  /* Three short steps (Cart, Checkout, Placed) stay on one row: stacked, they
     pushed the page a hundred pixels down a phone before anything to do. */
  .steps ol{flex-wrap:nowrap;gap:6px}
  .steps li{flex:1 1 0;padding:6px 8px;gap:6px;font-size:13px}
  .steps .n{width:20px;height:20px;font-size:12px}
  .toolbar{display:flex;flex-wrap:wrap;gap:8px}
  .toolbar form{display:inline-flex}

  /* Stacked, not squeezed into unreadable columns. */
  .row{flex-direction:column;gap:10px}
  .row > div{width:100%;flex:1 1 auto !important}
  .card{padding:14px}
  .stat{padding:13px}
  .stat .n{font-size:22px}

  /* A sticky action bar must not eat the screen on a short viewport. */
  .card[style*="sticky"]{padding:10px 12px}
}

/* --- pick one of two --------------------------------------------------------
   A pair of radios in a row reads as an afterthought, and on a counter the
   choice between posting something and handing it over is not an afterthought.
   Tiles, with the selected one obvious across the room. */
.choices{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.choice{flex:1 1 220px;display:flex;align-items:flex-start;gap:10px;
  border:1px solid var(--line);border-radius:10px;padding:12px 14px;
  cursor:pointer;background:var(--card);transition:border-color .12s,box-shadow .12s}
.choice:hover{border-color:var(--navy2)}
.choice input{width:auto;margin:2px 0 0}
.choice b{display:block;font-size:15px}
.choice span{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.choice:has(input:checked){border-color:var(--navy);box-shadow:0 0 0 2px var(--navy) inset}
.choice input:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
@media(max-width:640px){.choice{flex:1 1 100%}}

/* Headings inside a dropdown: a menu of fourteen items reads as three short
   lists rather than one long one. */
.navhead{display:block;padding:9px 12px 3px;font-size:10.5px;letter-spacing:.09em;
  text-transform:uppercase;color:#8fa3c0;cursor:default}
.navmenu .navhead:first-child{padding-top:6px}
/* The go-to box is a convenience for a wide screen; on a narrow one it
   only pushes the menu onto a second line. */
@media (max-width:1400px){#goto{display:none}}

/* --- a board: a page for a monitor of its own ------------------------------
   No menu bar, so the pinned heading sits at the top; nothing else changes. */
body.board{--topbar-h:0px}
body.board .page-title{position:static}

/* == checkout components ====================================================
   The shopping and checkout screens (portal cart, checkout, order, account)
   share these, on both faces: the classic tokens below are remapped onto
   Nocturne by body.nocturne in nocturne.css, so one rule serves both. No
   colour is written here except in the token block; everything else reads a
   token. Rules this section keeps:
   - one primary button per region (.btn.gold here, .btn-primary on Nocturne);
   - a disabled button looks disabled and says why in text beside it;
   - chips (.tag) are boxes at --radius-xs, never pills;
   - every interactive element shows a 2px focus outline;
   - checkboxes and radios are 22px, and the whole label is the target. */
:root{
  --hover:#f2f5f9; --radius-xs:3px; --radius-md:10px;
  --info:#1a5fb4; --infobg:#e5eefb;
  --shadow-bar:0 -6px 18px rgba(16,32,64,.10);
}
:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.5;cursor:not-allowed}
.btn:disabled:hover{filter:none}
.btn[aria-busy="true"]{cursor:progress}
.btn.btn-lg{padding:12px 22px;font-size:16px}
.tag{border-radius:var(--radius-xs)}
.visually-hidden{position:absolute !important;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.muted.small{font-size:12.5px}
.checkout [hidden],.cart-lines [hidden]{display:none !important}

/* flashes and standing conditions */
.flash.warning{background:var(--warnbg);color:var(--warn)}
.banner p{margin:0 0 6px}
.banner p:last-child{margin-bottom:0}
.banner .banner-title{font-weight:600}
.banner.error{background:var(--errbg);color:var(--err);border-color:var(--err)}
.banner.info{background:var(--infobg);color:var(--info);border-color:var(--info)}
.problem-list{margin:6px 0 0;padding-left:18px}
.problem-list li{margin:6px 0}
.inline-form{display:inline-flex;margin:0 0 0 8px;vertical-align:middle}
.field-error{color:var(--err);font-size:13px;margin:8px 0 0}
[aria-invalid="true"]{border-color:var(--err)}

/* the quantity stepper (portal/_stepper.html) */
.stepper{display:inline-flex;align-items:stretch;gap:4px;vertical-align:middle}
.stepper .step-btn{min-width:34px;padding:0 8px;display:inline-flex;align-items:center;
  justify-content:center;font-size:16px;line-height:1}
.stepper .qty{width:64px;text-align:center;padding:6px 4px}
@media(max-width:640px),(pointer:coarse){
  .stepper .step-btn{min-width:44px;min-height:44px}
  .stepper .qty{min-height:44px}
}

/* delivery options: one radio group */
fieldset.choices{border:0;margin:0;padding:0;display:grid;gap:10px;min-width:0}
fieldset.choices legend{font-size:16px;font-weight:600;padding:0;margin:0 0 10px}
fieldset.choices .choice{flex:none}
.choices-sub{margin:6px 0 0;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.choice input[type="radio"]{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--navy)}
.choice .choice-body{display:block;font-size:inherit;color:var(--ink);margin:0}
.choice .choice-body b{display:block;font-size:15px}
.choice .choice-body span{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.deliver-to{margin-top:14px}
.deliver-to p{margin:0 0 8px}
/* A choice a customer has to be able to see, not a link beside the address:
   "Deliver to a different address" reads as a button. */
.address-change summary{cursor:pointer;color:var(--navy2);font-weight:600;min-height:40px;
  display:inline-flex;align-items:center;padding:6px 14px;margin-top:6px;list-style:none;
  border:1px solid var(--line);border-radius:var(--radius-md);background:var(--card)}
.address-change summary::-webkit-details-marker{display:none}
.address-change summary:hover{background:var(--hover)}
.address-change[open] summary{margin-bottom:8px}
.address-fields{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:10px}
.address-fields .field{grid-column:span 2}
.address-fields .field.wide{grid-column:span 3}
.address-fields .field.narrow{grid-column:span 1}
.address-fields label{margin:0 0 4px}
@media(max-width:640px){.address-fields .field,.address-fields .field.wide,.address-fields .field.narrow{grid-column:1 / -1}}

/* totals (portal/_totals.html) */
.totals{display:grid;gap:2px;margin:12px 0 0 auto;max-width:440px}
.totals-row{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:4px 0;font-size:14px}
.totals-row.grand{border-top:1px solid var(--line);margin-top:6px;padding-top:10px;font-size:17px;font-weight:600}
.reference{display:grid;gap:6px;margin:0 0 8px}
.reference div{display:flex;gap:8px}
.reference dt{color:var(--muted);margin:0}
.reference dd{margin:0}
.reference-fields{margin-top:14px}

/* the Research Use Agreement: at sign-in, on an account request, at checkout */
.agreement{font-size:14px}
.agreement.checkout-section{border-left:4px solid var(--gold)}
.agreement ul{margin:0 0 10px;padding-left:1.2em}
.agreement-band{background:var(--navy);color:var(--card);padding:10px 14px;border-radius:var(--radius-xs);
  display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;margin:0 0 12px}
.agreement-band b{color:var(--gold2);letter-spacing:.04em}
.agreement-band span{font-size:13px;opacity:.88}
.agreement-doc{font-family:Georgia,"Times New Roman",serif;font-size:15px;line-height:1.55;color:var(--ink)}
.agreement-doc .head{display:flex;justify-content:space-between;gap:16px;align-items:baseline;flex-wrap:wrap;
  border-bottom:2px solid var(--navy);padding-bottom:8px;margin-bottom:12px}
.agreement-doc .head .t{font-weight:600;font-size:17px}
.agreement-doc .head .v{font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:12px;color:var(--muted)}
.agreement-doc h3{font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:12px;
  letter-spacing:.08em;text-transform:uppercase;color:var(--navy2);margin:16px 0 4px}
.agreement-doc h3 .n{display:inline-block;min-width:1.6em;color:var(--muted)}
.agreement-doc p{margin:0 0 8px;max-width:72ch}
.agreement-doc p.caps{font-weight:600;text-transform:uppercase;letter-spacing:.02em;font-size:14px}
.agreement-check{display:flex;gap:12px;align-items:flex-start;font-weight:400;font-size:14px;color:var(--ink);
  cursor:pointer;margin:10px 0 0;padding:6px 0}
.agreement-check input[type="checkbox"]{width:22px;height:22px;flex:0 0 22px;margin:0;accent-color:var(--navy)}
.agreement-small{font-size:12.5px;color:var(--muted);margin:8px 0 0}
.agreement-status{margin:0}
.agreement-actions{margin-top:14px}

/* the action bar: sticky along the foot of a phone */
.checkout-bar{margin-top:16px}
.checkout-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.checkout-help{font-size:13px;color:var(--muted);margin:8px 0 0}
.checkout-bar-total{display:none;margin:0 0 8px}
@media(max-width:640px){
  .checkout-bar{position:sticky;bottom:0;z-index:30;background:var(--card);border-top:1px solid var(--line);
    padding:10px 14px;box-shadow:var(--shadow-bar)}
  .card .checkout-bar{margin:16px -14px -14px}
  form > .checkout-bar{margin:16px -12px 0;border-radius:0}
  .checkout-bar-total{display:flex;justify-content:space-between;gap:12px;font-size:15px}
  .checkout-actions .btn{flex:1 1 auto;min-height:44px}
  /* Checkout: until the agreement box is ticked the bar stays in place under
     it, so "the box above" is the box just above; once ticked it follows. */
  .checkout-bar.await-agreement{position:static;box-shadow:none}
}

/* after placing */
.confirm-panel{border:1px solid var(--ok);background:var(--okbg);color:var(--ink);
  border-radius:var(--radius-md);padding:16px 18px;margin:0 0 16px}
.confirm-panel h2{margin:0 0 6px;font-size:18px;color:var(--ok)}
.confirm-panel p{margin:0;max-width:72ch}
.next-steps{margin:0 0 16px;max-width:72ch}
.after-card{margin:-6px 0 16px}
.address{margin:0;line-height:1.5}

/* an empty list, with the next thing to do */
.empty-state{text-align:center;padding:28px 16px;color:var(--muted)}
.empty-state p{margin:0 0 12px}

/* the customer's account */
.summary{margin-bottom:14px}
.summary-label{font-size:13px;margin:0}
.summary-figure{font-size:26px;font-weight:600}
.table-scroll{overflow-x:auto}

/* rows that stack on a phone keep their column names */
@media(max-width:640px){
  .ordertable td[data-label]{display:flex;justify-content:space-between;align-items:center;gap:12px}
  .ordertable td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:12px;
    text-transform:uppercase;letter-spacing:.03em}
  .ordertable td .stepper{flex:0 1 auto}
  .ordertable td .stepper input[type="number"]{width:72px;margin-top:0;padding:8px 4px}
}
@media(max-width:600px){
  .orders-table,.orders-table tbody,.orders-table tr,.orders-table td{display:block;width:100%;white-space:normal}
  .orders-table thead,.orders-table .col-extra{display:none}
  .orders-table tr{border:1px solid var(--line);border-radius:var(--radius-md);padding:8px 12px;margin-bottom:10px}
  .orders-table td{border:0;padding:3px 0;text-align:left !important;display:flex;justify-content:space-between;
    align-items:center;gap:12px}
  .orders-table td[data-label]::before{content:attr(data-label);color:var(--muted);font-size:12px;
    text-transform:uppercase;letter-spacing:.03em}
}
.steps .step-link{display:flex;align-items:center;gap:8px;min-width:0;color:inherit;text-decoration:underline;
  text-underline-offset:3px}
/* Promotions on the shopping path: a list price struck through beside a
   special price, the code box at checkout, and a code set large enough to
   read out to somebody. */
.was-price{font-weight:400;opacity:.6;font-size:.85em}
.pricebig .was-price{font-size:.5em}
.code-row{display:flex;gap:8px;align-items:center;max-width:420px}
.code-row input{text-transform:uppercase;margin-top:0}
.code-big{font-size:22px;font-weight:800;letter-spacing:.06em;margin:6px 0}
.code-earned{margin-top:10px}
.code-list{margin:4px 0 0 18px}
/* == end checkout components ================================================ */
