@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root,
html[data-theme="light"] {
  --bg: #F3F1EA;
  --surface: #FFFdf8;
  --border: #C9C4B8;
  --border-strong: #8A8F86;
  --ink: #1A2420;
  --muted: #5E6A64;
  --emerald: #0F5C4C;
  --emerald-hover: #083D32;
  --emerald-soft: #E7F0EC;
  --brass: #A6844A;
  --rust: #9A3B1A;
  --focus: #0F5C4C;
  --danger: #9A3B1A;
  --ok: #0F5C4C;
  --card: var(--surface);
  --input-bg: var(--surface);
  --shadow: 0 1px 2px rgba(26, 36, 32, 0.05), 0 6px 16px rgba(15, 92, 76, 0.08);
  --radius: 10px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Source Serif 4", Georgia, serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #121614;
  --surface: #1B211E;
  --border: #3A433E;
  --border-strong: #5A635E;
  --ink: #E7EEEA;
  --muted: #9AA59F;
  --emerald: #3CCB96;
  --emerald-hover: #2EBE8A;
  --emerald-soft: #163329;
  --brass: #C4A15C;
  --rust: #E08A5A;
  --focus: #2EBE8A;
  --danger: #E08A5A;
  --ok: #2EBE8A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(46, 190, 138, 0.08);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.topbar {
  height: 68px;
  background: color-mix(in srgb, var(--surface) 88%, var(--emerald-soft) 12%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(166, 132, 74, 0.45), var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
html[data-theme="dark"] .topbar {
  background: rgba(14, 22, 19, 0.92);
  border-bottom-color: #3A433E;
  box-shadow: 0 1px 0 rgba(196, 161, 92, 0.28), 0 8px 24px rgba(0, 0, 0, 0.28);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px;
}
img.brand-mark.mark-dark { display: none; }
img.brand-mark.mark-light { display: block; }
html[data-theme="dark"] img.brand-mark.mark-light { display: none; }
html[data-theme="dark"] img.brand-mark.mark-dark { display: block; }
.brand-text { min-width: 0; }
.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--emerald);
  line-height: 1.05;
}
.tagline {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brass);
  line-height: 1.2;
}

.hero {
  position: relative;
  color: #F3F1EA;
  background:
    radial-gradient(900px 280px at 12% -10%, rgba(46, 190, 138, 0.22), transparent 58%),
    radial-gradient(700px 240px at 92% 110%, rgba(166, 132, 74, 0.16), transparent 55%),
    linear-gradient(165deg, #10261F 0%, #0A1612 48%, #08110E 100%);
  border-bottom: 1px solid rgba(166, 132, 74, 0.38);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #A6844A 18%, #C4A15C 50%, #A6844A 82%, transparent 100%);
  opacity: 0.85;
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 24px 56px;
}
.hero-title {
  margin: 0 0 14px;
  max-width: 14ch;
  font-family: var(--serif);
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #FFFdf8;
  text-transform: none;
}
.hero-lede {
  margin: 0 0 28px;
  max-width: 36em;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 400;
  line-height: 1.45;
  color: #C5D2CC;
}
.hero-actions { display: flex; align-items: center; gap: 12px; }
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.hero-cta {
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(196, 161, 92, 0.45), 0 10px 28px rgba(8, 61, 50, 0.45);
}
.hero-cta:hover { background: #249E72; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #D5E0DB;
  border: 1px solid rgba(196, 161, 92, 0.38);
  background: rgba(15, 92, 76, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
}
#job { scroll-margin-top: 84px; }
.phone-action { display: none; }

html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (max-width: 700px) {
  .hero-inner { padding: 28px 16px 32px; }
  .hero-title { max-width: none; font-size: clamp(28px, 8.5vw, 36px); }
  .hero-lede { margin-bottom: 20px; }
  .topbar { height: auto; }
  .topbar-inner {
    height: auto;
    min-height: 56px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    flex-wrap: nowrap;
    gap: 8px;
  }
  .brand { gap: 10px; }
  .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .brand h1 { font-size: 18px; }
  .tagline { font-size: 11px; }
  .top-actions { width: auto; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
  .wide-action { display: none !important; }
  .phone-action { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
  .layout {
    padding: 16px 16px 48px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }
  .panel { padding: 16px; }
  input, select, textarea { font-size: 16px; min-height: 44px; height: 44px; }
  textarea { height: auto; min-height: 64px; }
  .btn.icon { width: 44px; min-height: 44px; height: 44px; }
  .line-head .desc { grid-column: 1 / -1; }
  .quote-head { flex-wrap: wrap; }
  dialog {
    width: calc(100% - 24px);
    max-width: 100%;
    max-height: min(90dvh, 90vh);
    overflow: auto;
    margin: auto;
  }
  .shop-sync-status, .save-status { padding-left: 16px; padding-right: 16px; }
}

.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn.primary { background: var(--emerald); color: #fff; border-color: var(--emerald); padding: 0 18px; }
.btn.primary:hover { background: var(--emerald-hover); }
.btn.secondary { background: var(--emerald-soft); color: var(--emerald); border-color: transparent; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--border-strong); }
.btn.icon {
  width: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-color: var(--border);
  background: transparent;
  color: var(--ink);
}
.btn.danger-ghost { color: var(--rust); border-color: var(--border); }

.more-wrap { position: relative; }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(26, 36, 32, 0.12);
}
.more-menu button {
  display: block; width: 100%;
  text-align: left;
  height: 36px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font: 600 13px var(--font);
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
}
.more-menu button:hover { background: var(--emerald-soft); }
body.mode-basic .seller-only { display: none !important; }

.save-status {
  margin: 0;
  padding: 8px 24px;
  font-size: 12px;
  color: var(--ok);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.save-status.is-error { color: var(--rust); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 360px);
  gap: 24px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}
.job-panel, .gcode-panel, .lines-panel { grid-column: 1; }
.summary-panel {
  grid-column: 2;
  grid-row: 1 / span 4;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .job-panel, .gcode-panel, .lines-panel, .summary-panel { grid-column: 1; }
  .summary-panel { grid-row: auto; position: relative; top: 0; max-height: none; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.summary-panel.panel { margin: 0; }

h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
}
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px;
}
.section-head h2 { margin: 0; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  min-width: 0;
}
label, label.full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
input, select, textarea {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
}
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
html[data-theme="dark"] input[type="date"] { color-scheme: dark; background: var(--surface); }

label.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  color: var(--ink);
  font-size: 14px;
}
label.check input { width: 16px; height: 16px; margin-top: 2px; }

.hint { margin: 0 0 12px; font-size: 11px; color: var(--muted); font-weight: 400; }
.hint-more { margin: 0 0 12px; font-size: 11px; color: var(--muted); }
.hint-more summary { cursor: pointer; font-weight: 600; }
.disclaimer {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.dropzone {
  position: relative;
  min-height: 112px;
  max-width: 100%;
  min-width: 0;
  border: 2px dashed var(--emerald);
  border-radius: 10px;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}
.dropzone p { margin: 0; max-width: 100%; overflow-wrap: anywhere; }
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%;
}
.dropzone.dragover { border-color: var(--emerald-hover); background: color-mix(in srgb, var(--emerald-soft) 80%, var(--emerald) 20%); }
.dropzone.loaded {
  min-height: 40px;
  flex-direction: row;
  justify-content: flex-start;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.error { color: var(--rust); font-size: 12px; margin-top: 8px; white-space: pre-line; }
.success { color: var(--ok); font-size: 12px; margin-top: 8px; white-space: pre-line; }

.lines { min-height: 72px; display: flex; flex-direction: column; gap: 12px; }
.empty-lines {
  min-height: 72px;
  display: flex; align-items: center;
  color: var(--muted); font-size: 13px;
}

.line-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--surface);
}
.line-head, .line-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
}
.line-head { margin-bottom: 12px; }
.line-head .desc { grid-column: span 2; }
.line-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; font-size: 12px; color: var(--muted);
}
.line-amount { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-soft);
  border-radius: 4px; padding: 2px 6px;
  align-self: center;
}
.badge.soft { color: var(--muted); }
.print-meta { grid-column: 1 / -1; }
.muted { color: var(--muted); font-size: 11px; font-weight: 400; }
.muted.full { grid-column: 1 / -1; }

.quote-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px;
}
.quote-head h2 { margin: 0; }
.switch {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer;
}
.switch input { width: 16px; height: 16px; }

.seller-panel {
  margin: 12px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}
.seller-panel summary {
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink);
  margin-bottom: 12px;
}
.seller-panel label { margin-bottom: 12px; }
.seller-fees { margin: 0 0 12px; }

.totals { margin: 16px 0 0; }
.totals > div {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--muted);
}
.totals dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.totals .grand {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  color: var(--ink);
}
.totals .grand dt, .totals .grand dd {
  font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.totals .grand dd {
  color: var(--emerald);
  border-bottom: 2px solid var(--brass);
  padding-bottom: 2px;
}
.totals .deposit dt, .totals .deposit dd {
  color: var(--rust);
  font-size: 14px;
  font-weight: 600;
}
.terms-preview { margin: 16px 0 0; font-size: 11px; color: var(--muted); }

dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 20px;
  max-width: 640px;
}
dialog::backdrop { background: rgba(26, 36, 32, 0.45); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.rates-form .grid-2 { margin: 12px 0; }

.quotes-list { max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.quote-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.quote-row .title { font-weight: 600; }
.quote-row .meta { font-size: 12px; color: var(--muted); }
.quote-row .total { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.quote-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quotes-empty { color: var(--muted); font-size: 13px; }

.theme-icon { display: none; }
html[data-theme="light"] .icon-moon { display: block; }
html[data-theme="dark"] .icon-sun { display: block; }
.save-status[hidden] { display: none; }

.catalog-actions { margin: 0 0 8px; }
.catalog-actions .btn { padding: 0 12px; height: 32px; font-size: 12px; }

.catalog-dialog { min-width: min(560px, 92vw); }
.catalog-tabs {
  display: flex; gap: 6px;
  margin: 8px 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.catalog-tab {
  appearance: none; border: 1px solid transparent;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.catalog-tab:hover { background: var(--emerald-soft); color: var(--emerald); }
.catalog-tab.is-active {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: transparent;
}
.custom-catalog-list {
  max-height: 40vh; overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 0 14px;
}
.custom-catalog-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.custom-catalog-row .title { font-weight: 600; font-size: 13px; }
.custom-catalog-row .meta { font-size: 12px; color: var(--muted); }
.custom-catalog-form h3 {
  margin: 0 0 10px; font-size: 14px; font-weight: 600;
}
.custom-catalog-form .grid-2 { margin: 0 0 4px; }
.catalog-empty { color: var(--muted); font-size: 13px; padding: 4px 0 8px; }

.more-menu .menu-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 6px 4px;
}
.more-menu .menu-email {
  padding: 6px 12px 4px;
  font: 500 11px var(--font);
  color: var(--muted);
  word-break: break-all;
}
.shop-sync-status {
  margin: 0;
  padding: 6px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.shop-sync-status.is-error { color: var(--rust); }


.panel, .layout, .hero-inner, .topbar-inner { min-width: 0; max-width: 100%; }
.layout, .panel, label, input, select, textarea { max-width: 100%; }
.line-head .desc { grid-column: 1 / -1; }

@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; padding: 16px; padding-bottom: max(48px, env(safe-area-inset-bottom)); }
  .job-panel, .gcode-panel, .lines-panel, .summary-panel { grid-column: 1; }
  .summary-panel { grid-row: auto; position: relative; top: 0; max-height: none; }
  .wide-action { display: none !important; }
  .phone-action { display: block; }
  .topbar-inner { flex-wrap: nowrap; }
  .top-actions { width: auto; }
  input, select, textarea { font-size: 16px; min-height: 44px; height: 44px; }
  textarea { height: auto; min-height: 64px; }
}


/* --- header + hero + dropzone composition (wins last) --- */
header.topbar { height: 56px; }
header.topbar .topbar-inner { height: 56px; padding: 0 24px; }
header.topbar .brand { gap: 10px; }
header.topbar .brand-mark { width: 24px; height: 24px; flex: 0 0 24px; }
header.topbar .brand h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-facts { display: none !important; }

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: grid;
  gap: 28px;
}
.hero-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #9AA59F;
}
.hero-title {
  margin: 0 0 14px;
  max-width: none;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #FFFdf8;
}
.hero-lede {
  margin: 0 0 22px;
  max-width: 36em;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: #C5D2CC;
}
.hero-actions { display: flex; }
.hero-cta {
  height: 48px;
  width: 100%;
  padding: 0 20px;
  font-size: 15px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(196, 161, 92, 0.45), 0 10px 28px rgba(8, 61, 50, 0.45);
}
.hero .dropzone {
  min-height: 120px;
  border: 1.5px dashed rgba(196, 161, 92, 0.5);
  background: rgba(243, 241, 234, 0.06);
  color: #E7EEEA;
  gap: 0;
  padding: 22px 18px;
  outline: none;
}
.hero .dropzone:focus,
.hero .dropzone:focus-visible {
  box-shadow: 0 0 0 2px rgba(196, 161, 92, 0.55);
}
.hero .dropzone.dragover {
  border-color: #C4A15C;
  background: rgba(196, 161, 92, 0.12);
}
.hero .dropzone-primary {
  font-size: 14px;
  font-weight: 600;
  color: #FFFdf8;
}
.hero .dropzone-hint {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: #9AA59F;
}
.hero .dropzone #gcodeStatus:not([hidden]) {
  margin-top: 8px;
  font-size: 11px;
  color: #C5D2CC;
}
.hero .dropzone.loaded {
  min-height: 120px;
  flex-direction: column;
  justify-content: center;
  font-family: var(--font);
  font-size: 14px;
}
#dropzone { scroll-margin-top: 72px; }

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    padding: 48px 24px 56px;
  }
  .hero-title {
    font-size: 44px;
    font-weight: 600;
    line-height: 1.1;
  }
  .hero-title br { display: none; }
  .hero-lede { font-size: 17px; }
  .hero-cta { height: 44px; width: auto; }
  .hero .dropzone { min-height: 160px; }
}

@media (max-width: 700px) {
  header.topbar,
  header.topbar .topbar-inner {
    height: 52px;
    min-height: 52px;
  }
  header.topbar .brand h1 { font-size: 18px; font-weight: 600; }
  .hero-inner { padding: 28px 16px 32px; gap: 22px; }
  .hero-cta { height: 48px; width: 100%; }
}

.hero .dropzone:has(#gcodeStatus:not([hidden])) .dropzone-hint { display: none; }

header.topbar .tagline {
  display: block;
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--muted);
}
html[data-theme="dark"] header.topbar .tagline { color: #9AA59F; }
.hero-kicker, .hero-actions { display: none !important; }
.hero-title .title-rest { display: inline; }
@media (max-width: 1023px) {
  .hero-title .title-rest { display: block; }
}

.gcode-panel .catalog-row { margin: 0; }
.gcode-panel select { width: 100%; }
.gcode-panel .hint-more { margin-top: 12px; }


.line-body select { width: 100%; max-width: 100%; }

body.mode-basic .quote-head .switch { display: none; }
body.mode-basic .cost-layer { display: none; }
body.mode-basic .terms-preview { display: none; }

details.job-panel > summary,
details.quote-setup > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
details.job-panel > summary::-webkit-details-marker,
details.quote-setup > summary::-webkit-details-marker { display: none; }
details.job-panel > summary::after,
details.quote-setup > summary::after {
  content: "▸";
  color: var(--muted);
  font-weight: 400;
}
details.job-panel[open] > summary::after,
details.quote-setup[open] > summary::after { content: "▾"; }
details.job-panel[open] > summary { margin-bottom: 16px; }
.quote-setup {
  margin: 4px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.quote-setup > summary { color: var(--muted); }

#grandTotal.pulse {
  animation: totalPulse 0.55s ease;
}
@keyframes totalPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.lines-panel .section-head { justify-content: flex-end; margin-bottom: 12px; }
.line-more { grid-column: 1 / -1; margin-top: 4px; }
.line-more > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}
.line-more > summary::-webkit-details-marker { display: none; }
.line-more[open] > summary { margin-bottom: 10px; }
.line-more .full { margin-top: 8px; }
.shop-sync-status[hidden] { display: none !important; }

.job-panel .job-names,
.job-panel .job-dates {
  grid-template-columns: 1fr 1fr;
}
.job-panel .job-dates { margin-top: 12px; }
.job-panel .full { margin-top: 12px; }
@media (max-width: 700px) {
  .job-panel .job-names,
  .job-panel .job-dates {
    grid-template-columns: 1fr 1fr;
  }
}

.print-catalog,
.print-qty {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}
.print-catalog select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 700px) {
  .print-catalog,
  .print-qty {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-setup {
  margin: 4px 0 12px;
  padding: 0;
  border-top: 0;
}
.quote-setup > h2 { margin: 0 0 12px; }
.print-qty {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 700px) {
  .print-qty { grid-template-columns: 1fr 1fr; }
  .print-qty label:last-child { grid-column: 1 / -1; }
}

.line-card { position: relative; padding-right: 40px; }
.line-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.line-remove:hover,
.line-remove:focus {
  color: var(--rust);
  background: transparent;
  outline: none;
}

.btn-download { white-space: nowrap; }
@media (max-width: 700px) {
  .btn-download {
    display: inline-flex !important;
    height: 36px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }
}
