/* The demo has its own type scale so the specimen reads like a physical invoice. */
.wf-section {
  --wf-rule: #cfc6bb;
  --wf-muted: #625968;
  --wf-mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--ink, #262344);
  background: var(--paper, #faf7f0);
  padding-block: clamp(65px, 7vw, 112px);
  font-family: "DM Sans", system-ui, sans-serif;
  scroll-margin-top: 64px;
}
.wf-section *, .wf-section *::before, .wf-section *::after { box-sizing: border-box; }
.wf-section [hidden] { display: none !important; }
.wf-section h2, .wf-section h3, .wf-section p, .wf-section ol, .wf-section dl, .wf-section dd { margin: 0; }
.wf-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(220px, .62fr);
  align-items: end;
  gap: clamp(24px, 5vw, 76px);
  margin-bottom: clamp(25px, 3.7vw, 48px);
}
.wf-label, .wf-mono { font-family: var(--wf-mono); }
.wf-section .wf-label {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.wf-swatch { width: 10px; height: 10px; background: #ed9464; transform: skew(-13deg); }
.wf-heading h2 { font-size: clamp(43px, 5.3vw, 78px); font-weight: 600; letter-spacing: -.066em; line-height: .98; }
.wf-section .wf-intro { max-width: 35ch; color: var(--wf-muted); font-size: clamp(16px, 1.45vw, 20px); line-height: 1.55; }
.wf-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
  border-radius: 21px;
  border: 1px solid #d8d0c7;
  background: #f2ece1;
}
.wf-paper-area {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(34px, 4vw, 58px);
  background-color: #e5def0;
  background-image: radial-gradient(#bdb2d0 .7px, transparent .8px);
  background-size: 8px 8px;
}
.wf-sheet {
  position: relative;
  width: min(100%, 375px);
  padding: clamp(23px, 2.65vw, 38px);
  color: #2f2a40;
  background: #fffcf4;
  box-shadow: 1px 2px 1px #45365915, 5px 9px 0 -2px #c7bbcf, 9px 17px 22px -8px #50425a38;
  transform: rotate(-3deg);
}
.wf-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 35px;
  height: 35px;
  background: linear-gradient(45deg, #e6ae83 49%, #c4b8d1 50%, #e5def0 54%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.wf-sheet-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 26px; font-size: 14px; font-weight: 650; letter-spacing: -.025em; }
.wf-bowl { position: relative; display: inline-block; width: 21px; height: 15px; border-bottom: 2px solid currentColor; }
.wf-bowl::before { content: ""; position: absolute; inset: 1px 0 2px; border: 1.8px solid currentColor; border-radius: 1px 1px 10px 10px; }
.wf-invoice-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wf-invoice-heading h3 { font: 500 clamp(32px, 3.5vw, 47px)/1.04 Georgia, serif; letter-spacing: -.06em; }
.wf-invoice-heading .wf-mono { color: #635d6b; font-size: 11px; }
.wf-sheet .wf-bill-to { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-block: 13px 20px; font-size: 13px; }
.wf-bill-to span, .wf-items thead th { color: #6d6469; font-family: var(--wf-mono); font-size: 10px; font-weight: 500; letter-spacing: .04em; }
.wf-items { width: 100%; table-layout: auto; border-collapse: collapse; font-size: clamp(12px, 1.04vw, 15px); }
.wf-items th, .wf-items td { background: transparent; padding: 9px 0; border-bottom: 1px solid #e4dacc; vertical-align: baseline; }
.wf-items th { text-align: left; font-weight: 550; }
.wf-items thead th { padding-top: 0; border-bottom-color: #aea294; }
.wf-items th:nth-child(2), .wf-items td:nth-child(2) { text-align: center; }
.wf-items th:last-child, .wf-items td:last-child { text-align: right; }
.wf-items td, .wf-figures dd, .wf-invoice-total strong { font-variant-numeric: tabular-nums; }
.wf-invoice-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 13px; font-size: 15px; font-weight: 650; }
.wf-invoice-total small { margin-left: 2px; color: #6d6469; font: 9px var(--wf-mono); }
.wf-invoice-total strong { font-size: clamp(25px, 2.45vw, 36px); line-height: 1; font-weight: 600; letter-spacing: -.055em; }
.wf-paper-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.wf-stamp {
  display: inline-block;
  padding: 4px 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  color: #776980;
  transform: rotate(-4deg);
  font: 500 11px/1.15 var(--wf-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
[data-wf-current="1"] .wf-stamp { color: #665189; }
[data-wf-current="2"] .wf-stamp { color: #865020; }
[data-wf-current="3"] .wf-stamp { color: #386047; }
.wf-sheet-rules { width: 24%; height: 8px; border-top: 1px solid #d7cebf; border-bottom: 1px solid #d7cebf; }
.wf-ledger { align-self: center; min-width: 0; padding: clamp(24px, 3.4vw, 52px); }
.wf-ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wf-ledger-head h3 { font-size: clamp(25px, 2.45vw, 35px); font-weight: 600; line-height: 1.1; letter-spacing: -.052em; }
.wf-page-count { color: var(--wf-muted); font-size: 11px; white-space: nowrap; }
.wf-section .wf-steps { display: flex; gap: 3px; padding: 0; margin-block: 13px 11px; list-style: none; }
.wf-steps li { flex: 1; min-width: 0; }
.wf-section .wf-steps button {
  display: block;
  width: 100%;
  padding: 8px 1px;
  border: 0;
  border-top: 2px solid #d4cbbf;
  border-radius: 0;
  color: #6a6268;
  background: transparent;
  cursor: pointer;
  font: 500 11px/1.3 var(--wf-mono);
  text-align: left;
}
.wf-section .wf-steps button[data-passed="true"] { border-color: #a79aae; }
.wf-section .wf-steps button[aria-current="step"] { color: #39304f; border-color: #39304f; font-weight: 700; }
.wf-figures { padding: 0; }
.wf-figures > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; padding: 7px 0; border-bottom: 1px solid var(--wf-rule); }
.wf-figures dt { display: flex; gap: 9px; align-items: center; color: #4c4554; font-size: clamp(13px, 1.06vw, 16px); line-height: 1.3; }
.wf-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.wf-stock-dot { background: #8b7aab; }
.wf-balance-dot { background: #d9905a; }
.wf-cash-dot { background: #7e8d71; }
.wf-figures dd { color: var(--ink, #262344); font: 550 clamp(19px, 1.58vw, 25px)/1.1 "DM Sans", system-ui, sans-serif; letter-spacing: -.055em; }
.wf-state-summary { margin-block: 16px; min-height: 3em; font-size: 14px; line-height: 1.5; color: #625968; }
.wf-section .wf-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 23px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--ink, #262344);
  color: var(--paper, #faf7f0);
  font: 600 14px/1.3 "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: background .18s, transform .18s;
}
.wf-section .wf-action-icon { color: var(--accent, #ffa66c); font-size: 19px; line-height: 1; }
.wf-section button:focus-visible { outline: 3px solid #80619c; outline-offset: 3px; }
.wf-static { color: var(--wf-muted); font-size: 14px; line-height: 1.5; }
@media (hover: hover) {
  .wf-section .wf-action:hover { background: #43395f; transform: translateY(-1px); }
  .wf-section .wf-steps button:hover { color: #262344; border-top-color: #8d7f96; }
}
@media (max-width: 830px) {
  .wf-heading { grid-template-columns: 1fr 1fr; }
  .wf-desk { grid-template-columns: 1fr 1fr; }
  .wf-paper-area { padding: 36px 23px; }
  .wf-ledger { padding: 26px 22px; }
}
@media (max-width: 650px) {
  .wf-heading { display: block; }
  .wf-section .wf-intro { margin-top: 17px; }
  .wf-desk { grid-template-columns: minmax(0, 1fr); border-radius: 16px; }
  .wf-paper-area { padding: 32px clamp(26px, 7.5vw, 49px) 37px; }
  .wf-sheet { max-width: 330px; padding: 20px 23px; }
  .wf-sheet-brand { margin-bottom: 16px; }
  .wf-sheet .wf-bill-to { margin-block: 9px 14px; }
  .wf-paper-foot { margin-top: 15px; }
  .wf-ledger { width: 100%; padding: 25px clamp(18px, 6vw, 33px) 27px; }
  .wf-section .wf-steps button { min-height: 44px; display: flex; align-items: center; }
  .wf-state-summary { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wf-section .wf-action { transition: none; }
  .wf-section .wf-action:hover { transform: none; }
}
