/* Ritual shop in the Ritual Studio app's look (same system as /studio/).
   Loaded last on every shop page; the tokens themselves are in styles.css :root.
   Flat near-black surfaces, 1px lines, 2px corners, one blue accent, DIN-style headings in normal case,
   mono for prices and numbers, and the technical grid behind the page. */

/* ---------- The technical grid behind every page ---------- */
main {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192' viewBox='0 0 192 192'%3E%3Cpath d='M0 0.5H192M0.5 0V192M0 48.5H192M48.5 0V192M0 96.5H192M96.5 0V192M0 144.5H192M144.5 0V192' stroke='%23161616' stroke-width='1' fill='none'/%3E%3Cpath d='M0.5 -3.0C0.75 0.25 0.75 0.25 4.0 0.5C0.75 0.75 0.75 0.75 0.5 4.0C0.25 0.75 0.25 0.75 -3.0 0.5C0.25 0.25 0.25 0.25 0.5 -3.0ZM192.5 -3.0C192.75 0.25 192.75 0.25 196.0 0.5C192.75 0.75 192.75 0.75 192.5 4.0C192.25 0.75 192.25 0.75 189.0 0.5C192.25 0.25 192.25 0.25 192.5 -3.0ZM0.5 189.0C0.75 192.25 0.75 192.25 4.0 192.5C0.75 192.75 0.75 192.75 0.5 196.0C0.25 192.75 0.25 192.75 -3.0 192.5C0.25 192.25 0.25 192.25 0.5 189.0ZM192.5 189.0C192.75 192.25 192.75 192.25 196.0 192.5C192.75 192.75 192.75 192.75 192.5 196.0C192.25 192.75 192.25 192.75 189.0 192.5C192.25 192.25 192.25 192.25 192.5 189.0ZM96.5 93.0C96.75 96.25 96.75 96.25 100.0 96.5C96.75 96.75 96.75 96.75 96.5 100.0C96.25 96.75 96.25 96.75 93.0 96.5C96.25 96.25 96.25 96.25 96.5 93.0Z' fill='%234A4A4A'/%3E%3C/svg%3E");
  background-size: 192px 192px; background-position: center top;
}
.hero { background: transparent; }
::selection { background: var(--accent-selected); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
body { font-size: var(--step-body); line-height: 1.6; }

/* ---------- Headings: DIN-style, semibold, normal case, tight ---------- */
.hero-title, .tools-body h2, .faq h1, .store-title, .drawer-title, .drawer-empty-title, .cp-title, .cp-lines .cl-name,
.cp-empty-title, .buy-title, .sec-title, .card-name, .pp-missing-title, .dock-name {
  font-family: var(--display); font-weight: 600; text-transform: none; letter-spacing: -0.01em; line-height: 1.05;
}
.hero-title { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); max-width: 20ch; }
.tools-body h2, .faq h1, .store-title, .cp-title, .pp-missing-title { font-size: var(--step-head); }
.buy-title { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); }
.sec-title { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.75rem); }
.drawer-title { font-size: 1.75rem; }
.drawer-empty-title, .cp-empty-title { font-size: 2rem; }
.cp-lines .cl-name, .card-name { font-size: 1.375rem; }
.dock-name { font-size: 1.125rem; }
.hero-lead { color: var(--muted); }

/* ---------- Prices and numbers in mono, as in the app ---------- */
.card-price, .cl-price, .cart-total dd, .buy-price, .item-price, .log-v, .cart-count, .seg-add {
  font-family: var(--code); font-weight: 500; letter-spacing: 0; text-transform: none;
}
.card-price { font-size: 1.125rem; color: var(--ink); }
.buy-price { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); }
.cart-total dd { font-size: 1.75rem; }
.log-v { font-size: 1.25rem; color: var(--accent-text); }

/* ---------- Buttons: the app's primary and secondary ---------- */
.btn, .cell, .add, .buy-btn, .dock-btn, .lb-btn, .account-btn, .account-item, .drawer-close, .store-tab, .seg-opt {
  border-radius: var(--radius);
}
.btn { min-height: 40px; padding: 0 18px; font: 600 15px/1 var(--text); }
.btn-accent, .cell-ink, .buy-btn, .dock-btn, .store-panel .add { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn-dark, .cell-tone, .lb-btn, .account-btn { background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover, .cell-ink:hover, .buy-btn:hover, .store-panel .add:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-dark:hover, .cell-tone:hover, .lb-btn:hover, .account-btn:hover { background: #2E2E2E; }
}
.btn-accent[aria-disabled="true"]:hover { background: var(--accent); }
.btn-quiet { color: var(--muted); }
.cell { font: 600 15px/1.2 var(--text); }
.store-panel .add { font: 600 14px/1 var(--text); text-transform: none; min-height: 36px; min-width: 84px; padding: 0 16px; }
.store-panel .add[data-in=true], .buy-btn[data-state="added"], .dock-btn[data-state="added"] {
  background: var(--accent-selected); color: var(--ink); border-color: #1B3A5C;
}

/* ---------- Header: the app's toolbar, solid with a 1px line ---------- */
.bar, .home .bar, .home .bar[data-over="hero"] {
  background: var(--surface); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding-top: 10px; padding-bottom: 10px;
}
.mark img { height: 32px; }
.bar-links { gap: 4px; }
.bar-links a { display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.bar-links a::after { display: none; }
@media (hover: hover) and (pointer: fine) { .bar-links a:hover { color: var(--ink); background: var(--surface-3); } }
.bar-links a[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.bar .btn-dark, .bar .account-btn { background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: none; min-height: 34px; padding: 0 12px; font-size: 14px; }
.bar .cart-btn { font-size: 14px; color: var(--muted); }
.bar .cart-btn .cart-count, .bar .cart-btn[data-filled="false"] .cart-count { border-radius: var(--radius); }
.bar .cart-btn[data-filled="false"] .cart-count { background: var(--surface-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-strong); /* taste-skill-ignore: a 1px control edge, as in the app */ }
.bar .account-pic { box-shadow: none; }
.bar .account-menu, .account-menu {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5); /* taste-skill-ignore: a menu floats */
}
.bar .account-item, .account-item { background: var(--surface-3); border: 1px solid var(--line-strong); font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .bar .account-item:hover { background: #2E2E2E; } }

/* ---------- Panels: flat, 1px lines, 2px corners ---------- */
.tools, .store-panel, .card-p, .cp-summary, .cp-lines .cart-line, .cp-empty, .facts, .step, .card, .log-list li, .notice, .g-stage, .plate, .cfg-file, pre.cfg-line {
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tools { margin-inline: var(--margin); background: var(--surface); }
.plate { background: var(--input); }
.tabs button::after { background: var(--accent-text); height: 2px; }
.tools-name { color: var(--accent-text); font-family: var(--code); font-size: 1rem; font-weight: 500; }
.cfg-file .k, pre.cfg-line .k { color: var(--accent-text); }
.star { background: var(--muted); }

/* Store: category tabs like the app's segmented toolbar, then one panel */
.store-tabs { gap: 4px; }
.store-tab {
  font: 500 14px/1 var(--text); text-transform: none; min-height: 36px; padding: 0 14px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.store-tab[aria-selected=true] { background: var(--accent-selected); color: var(--ink); border-color: #1B3A5C; }
@media (hover: hover) and (pointer: fine) { .store-tab:hover { color: var(--ink); } }
.store-panel { background: var(--surface); margin-top: 8px; }
.card-p { background: var(--input); }
.card-p:has(h3 a:focus-visible) { outline: 2px solid var(--accent-text); }
.card-meta { color: var(--caption); font-family: var(--code); font-size: 12.5px; letter-spacing: 0; }

/* Cart drawer and cart page */
.drawer { border-left: 1px solid var(--line); }
.drawer-head { border-bottom: 1px solid var(--line); }
.drawer-foot { border-top: 1px solid var(--line); }
.drawer-close { background: var(--surface-3); border: 1px solid var(--line-strong); }
.cl-pic { border: 1px solid var(--line); border-radius: var(--radius); }
.cl-name:hover { color: var(--accent-text); }
.cl-warn { color: var(--warning); }
.cl-remove:hover { color: var(--danger); }
.cart-undo button:hover { color: var(--accent-text); }
.cart-btn .cart-count { font-size: 12px; }

/* Product page */
.buy-cat { color: var(--caption); font: 600 12px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.seg-opt { border: 1px solid var(--line-strong); }
.seg-opt:has(input:checked) { background: var(--accent-selected); color: var(--ink); border-color: #1B3A5C; }
.thumb::after, .thumb[aria-selected="true"]::after { background: var(--accent-text); height: 2px; }
.feats li::before { background: var(--muted); }
.facts a:hover { color: var(--accent-text); }
.pp-id { color: var(--accent-text); }
.spec-table { font-family: var(--text); }
.spec-table td { font-family: var(--code); font-size: .95em; }

/* FAQ and footer */
.faq-lead { color: var(--muted); }
.foot { border-top: 1px solid var(--line); }
.foot-cols ul li:first-child { color: var(--caption); font: 600 11px/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.notice { background: var(--surface-2); border-color: var(--line-strong); }
