/* StickyPrint — visual system.
   Idea: a prepress proof. Cyan = pass 1 (positioning), yellow = the sticky
   note, key black = text, magenta = pass 2 / actions. Grey pasteboard,
   white paper, hairlines, registration marks, mono slug lines. */

:root {
  color-scheme: light;

  --paste: #e4e5e0;
  --paste-2: #d8d9d3;
  --paper: #ffffff;
  --panel: #fbfbf9;
  --ink: #131416;
  --ink-2: #45484d;
  --ink-3: #7b7f85;
  --rule: #cbcdc7;
  --rule-2: #e3e4df;

  --c: #0093d8;
  --c-ink: #0a6ea5;
  --c-soft: #e2f2fb;
  --m: #d4006e;
  --m-hover: #b3005d;
  --m-soft: #fde8f2;
  --y: #ffe14a;
  --y-soft: #fff7c7;
  --k: #131416;

  --ok: #1d7c4d;
  --ok-soft: #e4f4ea;
  --warn: #9a5200;
  --warn-soft: #fff1dc;

  --sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --r: 3px;
  --sheet-shadow: 0 1px 1px rgb(0 0 0 / 0.05), 0 8px 24px -6px rgb(0 0 0 / 0.14);
  --pop-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 16px 40px -8px rgb(0 0 0 / 0.22);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--paste);
  color: var(--ink);
  font: 400 15px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* ---- type helpers ---------------------------------------------------- */
.slug {
  color: var(--ink-3);
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ---- brand ------------------------------------------------------------ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-name span {
  color: var(--ink-3);
  font: 500 13px var(--mono);
  letter-spacing: 0;
}

/* ---- plates (C / M / Y / K swatches) ---------------------------------- */
.plate {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
  vertical-align: 0;
}

.plate-c { background: var(--c); }
.plate-m { background: var(--m); }
.plate-y { background: var(--y); }
.plate-k { background: var(--k); }

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}

.btn:hover {
  background: var(--paste);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: var(--m);
  background: var(--m);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--m-hover);
  background: var(--m-hover);
}

.btn-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #2b2d31;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  background: var(--paste);
}

.btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.btn-lg {
  min-height: 50px;
  padding: 0 22px;
  font-size: 16px;
}

.btn:disabled {
  opacity: 0.45;
  transform: none;
}

.btn .arrow {
  font-family: var(--mono);
  font-weight: 500;
  transition: transform 0.2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ---- forms ---------------------------------------------------------------- */
.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23131416' stroke-width='1.3'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
  background-size: 12px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--ink-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--ink);
  outline: 0;
  box-shadow: 0 0 0 3px var(--m-soft);
}

.input::placeholder,
.textarea::placeholder {
  color: #a3a6a0;
}

.unit {
  position: relative;
  display: flex;
  align-items: center;
}

.unit .input {
  padding-right: 34px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.unit > span {
  position: absolute;
  right: 10px;
  color: var(--ink-3);
  font: 12px var(--mono);
  pointer-events: none;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper);
}

.seg button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--m);
}

/* ---- toast ------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 10px 12px 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--pop-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

.toast.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast button {
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 2px;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
