@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;800&display=swap');

:root {
  --font-grotesque: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: var(--font-grotesque);
  --font-body: var(--font-grotesque);
  --weight-regular: 400;
  --weight-medium: 500;
}

:root {
  --ink: #1B1D1C;
  --ink-muted: #6B706C;
  --chrome: #8E9490;
  --paper: #FFFFFF;
  --glass: #ECEDEA;

  --surface: var(--paper);
  --surface-alt: var(--glass);
  --accent: #A32B22;
  --estimate: var(--accent);

  --text-primary: var(--ink);
  --text-secondary: var(--ink-muted);
  --border: var(--chrome);
  --focus-ring: var(--ink);
}

[data-app="ops"] {
  --surface: var(--glass);
  --surface-alt: var(--paper);
  --signal: #D0211A;
  --valid: #5C6B4A;
  --pending: #B07A1E;
  --row-active: #F6EDDC;
}

:root {
  --text-body: 17px;
  --text-meta: 14px;
  --lh-body: 1.6;
  --lh-tight: 1.25;
  --measure: 66ch;

  --fs-h1: clamp(26px, 1.15rem + 2.0vw, 42px);
  --fs-h2: clamp(21px, 1.05rem + 1.1vw, 30px);
  --fs-h3: clamp(17px, 0.98rem + 0.5vw, 21px);
  --fs-lead: clamp(18px, 1.05rem + 0.4vw, 21px);
  --fs-price: clamp(19px, 1.05rem + 0.9vw, 26px);
  --fs-price-lg: clamp(24px, 1.2rem + 1.4vw, 34px);

  --target: 48px;
  --target-cta: 52px;
}

[data-app="ops"] {
  --text-body: 14px;
  --text-meta: 13px;
  --lh-body: 1.35;
  --fs-h1: 17px;
  --fs-h2: 15px;
  --fs-h3: 14px;
  --fs-lead: 14px;
  --fs-price: 15px;
  --fs-price-lg: 22px;
  --target: 44px;
  --target-cta: 44px;
  --row-min: 56px;
  --target-live: 80px;
}

:root {
  --sp-1: 4px;
  --sp-2: 6px;
  --sp-3: 8px;
  --sp-4: 11px;
  --sp-5: 16px;
  --sp-6: 23px;
  --sp-7: 32px;
  --sp-8: 45px;
  --sp-9: 64px;

  --gutter: var(--sp-5);
  --section-gap: var(--sp-8);
}

[data-app="ops"] {
  --gutter: var(--sp-4);
  --section-gap: var(--sp-5);
}

:root {
  --radius: 0;
  --shadow: none;
  --rule: 1px solid var(--chrome);
  --rule-strong: 2px solid var(--ink);
  --rule-width: 1px;

  --bp-base: 375px;
  --bp-mobile-lg: 430px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-ceiling: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, th, label, legend, button {
  text-transform: none;
  font-family: var(--font-heading);
  font-weight: var(--weight-medium);
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); margin: 0 0 var(--sp-4); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); margin: 0 0 var(--sp-4); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-tight); margin: 0 0 var(--sp-3); }
p  { margin: 0 0 var(--sp-5); max-width: var(--measure); }

.num, [data-num], td, th, time, output, input[inputmode="numeric"], input[type="number"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
[data-app="ops"] a:hover { text-decoration-thickness: 1px; color: var(--ink-muted); }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

::selection { background: var(--glass); color: var(--ink); }
[data-app="ops"] ::selection { background: var(--row-active); color: var(--ink); }

img, video { max-width: 100%; height: auto; display: block; }

.logotype {
  font-family: var(--font-heading);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}

.muted { color: var(--text-secondary); }
.meta  { color: var(--text-secondary); font-size: var(--text-meta); }
.estimate { color: var(--estimate); font-variant-numeric: tabular-nums; }

.rule { border: 0; border-top: var(--rule); margin: 0; height: 0; }
.rule-strong { border: 0; border-top: var(--rule-strong); margin: 0; height: 0; }

.block { background: var(--surface-alt); padding: var(--sp-6); }
[data-app="ops"] .block { padding: var(--sp-5); }

.stack { display: flex; flex-direction: column; }
.stack > * { min-width: 0; }
.page { padding: var(--gutter); }
.measure { max-width: var(--measure); }

.btn {
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: 1;
  min-height: var(--target);
  padding: 0 var(--sp-5);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  text-decoration: none;
}
.btn:hover { background: #000; }
.btn:active { background: var(--ink); transform: none; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--glass); }
.btn-block { display: flex; width: 100%; min-height: var(--target-cta); }
.btn[disabled] { opacity: 0.45; cursor: default; }
[data-app="ops"] .btn { font-size: var(--text-body); justify-content: flex-start; }

.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.field > label { font-size: var(--text-meta); font-weight: var(--weight-medium); }
.field > .hint { font-size: var(--text-meta); color: var(--text-secondary); }
.input {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--chrome);
  border-radius: 0;
  min-height: var(--target);
  padding: 0 var(--sp-4);
  width: 100%;
}
textarea.input { padding: var(--sp-4); line-height: 1.45; resize: vertical; }
.input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -1px; }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-body); }
.table th, .table td { text-align: left; padding: var(--sp-4) var(--sp-4); border-bottom: var(--rule); vertical-align: top; }
.table th { font-weight: var(--weight-medium); color: var(--text-secondary); font-size: var(--text-meta); }
.table td.right, .table th.right { text-align: right; }
.table tr[data-active="true"] td { background: var(--row-active); }

@media (max-width: 767px)  { [data-p="2"], [data-p="3"] { display: none; } }
@media (min-width: 768px) and (max-width: 1023px) { [data-p="3"] { display: none; } }

.skeleton { background: var(--glass); border: 0; display: block; }
[data-app="ops"] .skeleton { background: var(--glass); }

@media (min-width: 1024px) {
  [data-mobile-only="true"] { display: none !important; }
  [data-desktop-only="true"] { display: flex !important; }
}
image-slot { width: 100%; height: 100%; display: block; }
.piece-top { padding: var(--sp-4) var(--sp-5) var(--sp-7); max-width: 1120px; }
.piece-top > div:first-child { max-width: 440px; }
@media (min-width: 768px) {
  .piece-top { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
}
select.input { appearance: none; background-image: none; padding-right: var(--sp-5); }
