/* Roboto Condensed © 2011 Google Inc. Apache License 2.0, see fonts/LICENSE-APACHE-2.0.txt. */
@font-face {
  font-family: "Roboto Condensed";
  src: url("fonts/roboto-condensed-regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("fonts/roboto-condensed-bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}

:root {
  color-scheme: light;
  --ink: #171715;
  --muted: #57544e;
  --accent: #923a22;
  --paper: #fff;
  --stone: #f3f1ed;
  --line: #dedad2;
  --input-border: #868178;
  --gutter: clamp(12px, 3vw, 48px);
}

* { box-sizing: border-box }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.45 "Roboto Condensed", "Arial Narrow", Arial, sans-serif }
a { color: inherit; text-decoration: none }
a:hover { text-decoration: underline; text-underline-offset: 3px }
button, select, input { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: default; opacity: .48 }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px }
[hidden] { display: none !important }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px var(--gutter);
  background: var(--ink);
  color: #fff;
}
.brand { font-size: clamp(17px, 2vw, 23px); font-weight: 700; letter-spacing: .07em; text-transform: uppercase }
.return { font-size: 14px }
.return span { margin-left: 3px }
main, footer { padding-inline: var(--gutter) }
.intro { padding: clamp(20px, 3vw, 44px) 0 18px }
h1, h2 { margin: 0; font-weight: 700; line-height: 1.04; text-transform: uppercase }
h1 { font-size: clamp(36px, 5.4vw, 74px); letter-spacing: -.023em }
h2 { font-size: clamp(21px, 2.7vw, 34px) }
.intro p { margin: 8px 0 0; color: var(--muted) }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em }

.steps { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line) }
.steps button {
  min-width: 92px;
  padding: 8px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-weight: 700;
}
.steps button[aria-current] { border-color: var(--ink) }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px }
.panel { background: var(--paper); border: 1px solid var(--line); min-width: 0 }
.settings, .artwork { padding: clamp(14px, 2vw, 24px) }
.settings {
  display: grid;
  grid-template-columns: minmax(190px, 360px) minmax(0, 1fr);
  gap: 18px clamp(20px, 4vw, 62px);
  align-items: end;
}
.field, legend { padding: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0 }
select { display: block; width: 100%; min-height: 42px; margin-top: 4px; padding: 7px 10px; border: 1px solid var(--input-border); background: #fff }
.finishes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px }
.swatches button { width: 32px; height: 32px; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px #928e86 }
.swatches button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink) }
.finish-name { color: var(--muted); font-size: 14px }

.preview-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px clamp(12px, 2vw, 24px) }
.preview-header h2 { margin-top: 4px }
.pill { padding: 4px 9px; background: var(--stone); font-size: 13px; text-align: center }
.stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--stone); border-block: 1px solid var(--line) }
figure { margin: 0; min-width: 0 }
.stage figure + figure { border-left: 1px solid var(--line) }
figcaption { padding: 12px 0 2px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase }
.pane-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
}
.pane-bar > span { margin-right: auto }
.pane-bar select, .zoom-button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--input-border);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: normal;
}
.zoom-button { min-width: 60px; text-transform: uppercase }
.zoom-button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff }
canvas { display: block; width: 100%; height: auto; margin-inline: auto }
.stage canvas { max-width: 740px }
.stage.is-editing canvas { cursor: grab; touch-action: pan-y }
.stage.is-editing canvas.is-dragging { cursor: grabbing }
.stage.has-placed canvas { touch-action: none }
.stage-footer { display: flex; align-items: center; gap: 8px; padding: 9px clamp(12px, 2vw, 24px); color: var(--muted); font-size: 14px }
.dot { width: 6px; height: 6px; flex: none; background: var(--accent) }

.artwork .panel-header { margin-bottom: 15px }
.artwork-body { display: grid; grid-template-columns: minmax(190px, 280px) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px) }
.drop { display: grid; justify-items: center; gap: 5px; padding: 14px 8px; border: 1px dashed var(--input-border); background: var(--stone); text-align: center; cursor: pointer; overflow-wrap: anywhere }
.drop:hover, .drop.drag-in { background: #eae4d9 }
.drop:has(+ input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px }
.drop small, .privacy { color: var(--muted); font-size: 13px }
.upload-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); background: #fff }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.art-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px }
.text-button { border: 0; padding: 4px 0; background: none; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; font-weight: 700 }
#status { color: var(--accent); font-size: 14px; margin: 5px 0 }
#status:empty { display: none }
#adjustments { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(160px, 1.2fr) minmax(115px, 1fr); gap: 16px 24px }
.locations { display: grid; gap: 4px; margin-top: 7px }
.location { display: flex; align-items: center; gap: 7px; font-size: 14px }
input { accent-color: var(--ink) }
.location input, .effects input { margin: 0 }
.location button { flex: 1; border: 1px solid transparent; padding: 4px 6px; background: none; text-align: left }
.location button[aria-pressed=true] { border-color: var(--input-border); background: var(--stone) }
.control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 6px; margin: 8px 0; font-size: 14px }
.control output { color: var(--muted); font-variant-numeric: tabular-nums }
.control input { grid-column: 1/-1; width: 100%; height: 20px; margin: 0 }
.effects { margin-top: 8px; font-size: 14px }
.effects label { display: flex; align-items: center; gap: 6px }
.artwork-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line) }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 8px 15px; border: 1px solid var(--ink); font-weight: 700 }
.primary { background: var(--ink); color: #fff }
.primary:not(:disabled):hover { background: #383631 }
.secondary { background: var(--paper); border-color: var(--input-border) }
.secondary:not(:disabled):hover { background: var(--stone) }

.proof-toolbar, .proof-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px }
.proof-toolbar { justify-content: space-between; margin-bottom: 12px }
.proof-paper { padding: clamp(14px, 2vw, 27px); text-align: center }
.proof-paper h2 { margin-top: 6px }
.proof-paper p { margin: 7px 0; color: var(--muted) }
.proof-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 15px auto 12px; padding: 4px; width: max-content; max-width: 100%; background: var(--stone) }
.proof-options button { border-color: transparent; padding: 7px 11px }
.proof-options button[aria-pressed=true] { background: var(--ink); color: #fff }
.engraving-settings { display: flex; justify-content: center; align-items: end; gap: 10px 15px; flex-wrap: wrap; margin: 10px 0 }
.engraving-settings label { font-size: 14px; font-weight: 700; text-align: left }
.engraving-settings input { display: block; width: 120px; min-height: 42px; margin-top: 4px; padding: 6px 9px; border: 1px solid var(--input-border) }
.engraving-type { text-align: left }
.engraving-type legend { font-size: 14px; letter-spacing: normal; text-transform: none }
.engraving-type div { display: flex; margin-top: 4px }
.engraving-type button + button { border-left-width: 0 }
.engraving-type button[aria-pressed=true] { background: var(--ink); color: #fff }
.engraving-type button:focus-visible { position: relative; z-index: 1 }
.engraving-settings span { color: var(--muted); padding-bottom: 8px; font-size: 13px }
.proof-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.proof-views figure, #binary-proof { border: 1px solid var(--line); background: var(--stone) }
.proof-views[data-view=front], .proof-views[data-view=back] { grid-template-columns: 1fr; max-width: 930px; margin-inline: auto }
.proof-views[data-view=front] [data-side=back], .proof-views[data-view=back] [data-side=front] { display: none }
#binary-proof { max-width: 930px; margin-inline: auto; padding: 12px }
#binary-proof img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin: 8px auto; object-fit: contain; image-rendering: pixelated }
#binary-proof img:not([src]), #proof-status:empty { display: none }
#binary-proof p, #proof-status { font-size: 14px }
.proof-note { padding-top: 12px; margin-top: 16px !important; border-top: 1px solid var(--line); font-size: 13px }
footer { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: 14px; padding-block: 24px }

@media (max-width: 850px) {
  .artwork-body { grid-template-columns: 1fr }
  .artwork-source { max-width: 420px }
}

@media (max-width: 540px) {
  .settings, #adjustments, .proof-views { grid-template-columns: 1fr }
  .stage { grid-template-columns: 1fr }
  .stage figure + figure { border-left: 0; border-top: 1px solid var(--line) }
  .stage canvas { max-width: 440px }
  .artwork-source { max-width: none }
  #adjustments fieldset + fieldset { padding-top: 7px }
}

@media print {
  @page { margin: 14mm }
  .masthead, .intro, .steps, .proof-toolbar, .proof-options, .engraving-settings, #proof-status, #binary-proof, footer { display: none !important }
  main { padding: 0 }
  .proof-paper { border: 0; padding: 0 }
  #proof .proof-views { display: grid !important; grid-template-columns: 1fr 1fr; max-width: 150mm; margin: auto }
  #proof .proof-views figure { display: block; background: #fff; border: 0 }
}
