/* Customer screens share the Hive switch and keep their own layout and typography. */
.customer-header-actions { display: flex; flex: none; align-items: center; gap: clamp(8px,1vw,12px); }
/* A page header with no tab bar (Terms) has only the logo and these buttons: keep the buttons at the right edge,
   not in the middle grid column next to the logo. */
.customer-theme .top > .brand:has(+ .customer-header-actions) { grid-column: 1; grid-row: 1; align-self: center; }
.customer-theme .top > .brand + .customer-header-actions { grid-column: 1 / -1; grid-row: 1; justify-self: end; align-self: center; }
.customer-header-actions .header-profile {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: #f8e4a6; color: #413719;
}
.customer-header-actions .header-profile:is(:hover,[aria-current="page"]) { background: #ffdb69; }
.customer-header-actions .header-profile[aria-current="page"] { box-shadow: var(--hv-press); }
@media (max-width: 700px) {
  .customer-theme .top { gap: 8px; }
  .customer-theme .top .brand-logo { max-width: min(210px,43vw); }
}
@media (min-width: 701px) {
  .customer-theme .desktop-nav {
    display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:0;
    background:linear-gradient(180deg,#e1ebb7,#eff4d6);
    border-color:#fbfdef;
    box-shadow:6px 9px 19px #66723c26, inset 0 2px 3px #ffffef, inset 0 -4px 9px #a3b86730;
  }
  .customer-theme .desktop-nav a { color:#4b5737; }
  .customer-theme .desktop-nav a:is(:hover,[aria-current="page"]) { color:#8d3616; }
  .customer-theme .desktop-nav a[aria-current="page"]::before {
    height:3px; border-radius:0 0 4px 4px; background:#e66933;
    box-shadow:0 4px 12px 3px #e6693340;
  }
  .customer-theme .desktop-nav a:focus-visible { outline-offset:-5px; border-radius:12px; }
}

[data-theme="dark"] {
  --page-clay: var(--hv-bg);
}
[data-theme="dark"] .customer-theme {
  --base: var(--hv-surface); --ink: var(--hv-ink); --muted: var(--hv-muted);
  --line: var(--hv-border); --raised: var(--hv-sh-2); --inset: var(--hv-field);
  color: var(--ink); background: var(--hv-bg);
}
[data-theme="dark"] .customer-theme :is(.raised,.hero,.step,.price-panel,.order-timeline [aria-current="step"],
  .upload-panel,.upload-drop-hint,.orders-card,.file-review,.print-options,.review-tile-visual,
  #queue .review-add,#queue .review-remove,.review-summary,.colour-pages-field,.copy-stepper,
  .print-choices label:has(:checked),#order-history details > button,.footer-surface,.footer-wordmark-panel) {
  color: var(--ink); background: var(--hv-surface-2); border-color: var(--line); box-shadow: var(--raised);
}
[data-theme="dark"] .customer-theme :is(.hero .lede,.profile-login-divider,.footer-intro p,
  .footer-directory a,.footer-actions p,.footer-bottom) { color: var(--muted); }
[data-theme="dark"] .customer-theme :is(.price-binding dd,.footer-directory-contact svg) { color: var(--hv-honey-ink); }
[data-theme="dark"] .customer-theme :is(.desktop-nav,.mobile-dock) { color: var(--ink); background: var(--hv-surface); box-shadow: var(--raised); }
[data-theme="dark"] .customer-theme :is(.desktop-nav,.mobile-dock) a { color: var(--muted); }
[data-theme="dark"] .customer-theme .desktop-nav a:is(:hover,[aria-current]) {
  color: var(--hv-honey-ink); background: transparent; box-shadow: none;
}
[data-theme="dark"] .customer-theme .desktop-nav a[aria-current]::before {
  background: var(--hv-honey-500);
  box-shadow: 0 4px 12px 2px #f5c54255;
}
[data-theme="dark"] .customer-theme .mobile-dock a:is(:hover,[aria-current]) {
  color: var(--hv-honey-ink); background: var(--hv-surface-3); box-shadow: none;
}
[data-theme="dark"] .customer-theme :is(.checkout-fields,.profile-email-form) :is(input,select,textarea),
[data-theme="dark"] .customer-theme :is(.copy-stepper button,.copy-stepper input) {
  color: var(--ink); background: var(--hv-surface); box-shadow: var(--inset);
}
[data-theme="dark"] .customer-theme .profile-login {
  --profile-surface: var(--hv-surface-2); --profile-button-shadow: var(--raised);
  box-shadow: var(--raised);
}
[data-theme="dark"] .customer-theme .profile-login .profile-login-banner h1 { color: var(--ink); }
[data-theme="dark"] .customer-theme .profile-login-body .google-login-button { color: var(--ink); background: var(--hv-surface-3); }
[data-theme="dark"] .customer-theme .customer-header-actions .header-profile {
  color: var(--hv-honey-ink); background: var(--hv-surface-3);
}
/* Dark mode uses a logo with light lettering, so there is no glow or outline around it. */
[data-theme="dark"] .customer-theme :is(.top .brand-logo,.footer-intro img) {
  content: url("printbee-header-logo-dark.webp?v=2");
  filter: none;
}
[data-theme="dark"] .customer-theme .desktop-nav { border-color: var(--line); }
[data-theme="dark"] .customer-theme input::placeholder { color: var(--muted); opacity: 1; }

.cart-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.cart-page-heading h1 { margin: 0; }

.cart-page #queue-status:empty { display: none; }

/* Profile account home in dark mode keeps its own surfaces off the honey tones. */
[data-theme="dark"] .customer-theme .account-hero { background: var(--hv-surface-3); box-shadow: var(--raised); }
[data-theme="dark"] .customer-theme .account-avatar { background: var(--hv-honey-500); color: #2a2112; box-shadow: var(--raised); }
[data-theme="dark"] .customer-theme .account-who { color: var(--ink); }
[data-theme="dark"] .customer-theme .account-chip { background: var(--hv-surface); }
[data-theme="dark"] .customer-theme .account-row { background: var(--hv-surface-2); box-shadow: var(--raised); color: var(--ink); }
[data-theme="dark"] .customer-theme .row-text small { color: var(--muted); }
[data-theme="dark"] .customer-theme .account-group h2 { color: var(--hv-honey-ink); }
[data-theme="dark"] .customer-theme .tile-icon { background: var(--hv-honey-500); color: #2a2112; box-shadow: none; }

/* Cart page in dark mode */
[data-theme="dark"] .customer-theme .cart-page #queue-list li.cart-item,
[data-theme="dark"] .customer-theme .cart-empty { background: var(--hv-surface-2); box-shadow: var(--raised); }
[data-theme="dark"] .customer-theme .cart-badge,
[data-theme="dark"] .customer-theme .cart-empty-orb { background: var(--hv-honey-500); color: #2a2112; box-shadow: none; }
[data-theme="dark"] .customer-theme .cart-chips span { background: var(--hv-surface-3); color: var(--muted); }
[data-theme="dark"] .customer-theme .cart-page #queue-list li.cart-item button { background: var(--hv-surface-3); color: var(--ink); box-shadow: none; }
[data-theme="dark"] .customer-theme .cart-page #queue-list li.cart-item .cart-remove { color: #ff9a8f; }
[data-theme="dark"] .customer-theme .cart-page .cart-summary:not([hidden]) { background: var(--hv-surface-3); box-shadow: var(--raised); color: var(--ink); }
[data-theme="dark"] .customer-theme .cart-summary .pill { background: var(--hv-honey-500); color: #2a2112; }
[data-theme="dark"] .customer-theme .cart-eyebrow { color: var(--hv-honey-ink); }

/* One page-title system for every customer page: same size, spacing and subtitle. */
main.inner-page { padding-top: clamp(22px, 3.4vw, 40px); }
main.inner-page h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
main.inner-page h1 + p,
main.inner-page .cart-sub {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
}
main.inner-page .cart-page-heading { margin-bottom: 4px; }
main.inner-page .cart-page-heading .cart-sub { margin-top: 0; }
main.inner-page .section.upload-section { padding-top: 0; }
main.inner-page .profile-login .profile-login-banner h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; }

/* Checkout button keeps its dark look on hover and focus (it was turning pale yellow with white text). */
.cart-page .cart-summary .pill.yellow,
.cart-page .cart-summary .pill.yellow:hover,
.cart-page .cart-summary .pill.yellow:focus-visible {
  background: #2f2615;
  color: #fff3cf;
}
.cart-page .cart-summary .pill.yellow:hover { background: #443823; }
[data-theme="dark"] .customer-theme .cart-page .cart-summary .pill.yellow,
[data-theme="dark"] .customer-theme .cart-page .cart-summary .pill.yellow:focus-visible { background: var(--hv-honey-500); color: #2a2112; }
[data-theme="dark"] .customer-theme .cart-page .cart-summary .pill.yellow:hover { background: var(--hv-honey-400, #ffd35c); color: #2a2112; }

/* Same title size and same distance from the header on every customer page. */
main.inner-page, main.address-layout { padding-top: 26px; }
main.inner-page > .section, main.inner-page > article.section { padding-top: 0; border-top: 0; }
main.inner-page h1,
main.address-layout .address-book > h1,
main.inner-page .price-section > h2:first-child {
  margin: 0 0 18px;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -.03em;
}
main.inner-page .cart-page-heading { margin: 0 0 4px; }
main.inner-page .cart-page-heading h1 { margin-bottom: 0; }
[data-theme="dark"] .customer-theme .orders-empty { background: var(--hv-surface-2); box-shadow: var(--raised); color: var(--ink); }

/* dark mode: the "how it works" tiles keep a dark surface so their light text stays readable */
[data-theme="dark"] .customer-theme .how li { background: linear-gradient(150deg, var(--hv-surface-2), var(--hv-surface)); color: var(--ink); box-shadow: var(--raised); }
[data-theme="dark"] .customer-theme .how h3 { color: var(--ink); }

/* Terms: readable document typography within the shared PrintBee theme. */
.terms-page .terms-main { max-width:1040px; padding-top:36px; }

.terms-index { position:sticky; top:24px; min-width:0; }
.terms-index nav { display:grid; gap:5px; padding:18px 12px; border:1px solid var(--hv-border); border-radius:22px; background:var(--hv-surface-2); box-shadow:var(--hv-sh-1); }
.terms-index h2 { margin:0 8px 8px; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.terms-index nav a { display:flex; align-items:center; gap:9px; min-height:44px; padding:8px; border-radius:12px; color:var(--ink); font-size:12px; font-weight:700; line-height:1.5; text-decoration:none; }
.terms-index nav a span { color:var(--hv-honey-ink); font-size:11px; font-variant-numeric:tabular-nums; }
.terms-index nav a:hover { background:var(--hv-surface); box-shadow:var(--hv-sh-1); }
.terms-index > p { margin:20px 8px 0; color:var(--muted); font-size:12px; line-height:1.7; }
.terms-index > p a { display:block; width:fit-content; padding:8px 0; color:var(--ink); font-weight:700; text-underline-offset:4px; }
.terms-document { min-width:0; padding:clamp(22px,3vw,36px); border:1px solid var(--hv-border); border-radius:28px; background:var(--hv-surface); box-shadow:var(--hv-sh-2); }
.terms-section { margin:0; padding:0; scroll-margin-top:28px; }
.terms-section + .terms-section { margin-top:28px; padding-top:28px; border-top:1px solid var(--hv-border); }

.terms-number { display:grid; place-items:center; flex:none; width:34px; height:34px; border-radius:11px; background:var(--hv-surface-2); color:var(--hv-honey-ink); font-size:11px; font-weight:800; box-shadow:var(--hv-sh-1); }
.terms-page .terms-section h2 { margin:0; color:var(--ink); font-size:clamp(18px,2vw,21px); line-height:1.4; letter-spacing:-.02em; }
.terms-section > p { margin:0; max-width:65ch; color:var(--muted); font-size:14px; line-height:1.85; overflow-wrap:anywhere; }
.terms-document a { color:var(--ink); font-weight:700; text-decoration:underline; text-decoration-color:var(--hv-honey-500); text-underline-offset:4px; }
.terms-page a:focus-visible { outline:3px solid var(--hv-honey-500); outline-offset:4px; border-radius:6px; }
.terms-page .footer-bottom { max-width:1040px; margin-inline:auto; }
@media (max-width:760px) {
  .terms-page .terms-main { padding-top:26px; }
  
  
  .terms-index { position:static; }
  .terms-index nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:12px; }
  .terms-index h2 { grid-column:1/-1; margin-bottom:0; }
  .terms-index nav a { flex-direction:column; align-items:flex-start; gap:3px; font-size:11px; }
  .terms-index > p { display:none; }
  .terms-document { border-radius:24px; }
}
@media (max-width:380px) { .terms-index nav { padding:10px 6px; } .terms-index nav a { padding:6px; } }

/* Long option labels (for example the Bond paper line) must never push a page wider than the screen. */
.customer-theme select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.customer-theme .price-panel label { display: block; max-width: 100%; }
.customer-theme .price-panel label select { width: 100%; }

/* Match the Address empty-state surface across the five customer tabs.
   Keep existing borders, clay shadows, status colours and selection outlines. */
.customer-theme #main :is(
  .hero, .how li, .price-panel,
  .orders-card, .orders-empty,
  .upload-panel, .upload-drop-hint, .upload-break,
  .file-review, .print-options, .review-tile-visual, .review-summary,
  .cart-empty, #queue-list > li.cart-item, .cart-summary,
  .address-empty, .address-card, .address-composer
) {
  background: var(--pb-customer-card);
}
