/* /dynatotites/ — the chapter layout and the eleven product mocks.
   Everything is prefixed dn- and touches nothing shared. The RESTING state of
   every mock is the finished picture (the ΜΑΡΚ stamped, the tag on the order,
   the ring full); assets/dynatotites.js only replays how it got there, and only
   where the motion engine is present and the reader has not asked for less
   motion. Elements marked dn-before are the "before" frames the scenes show
   briefly; without script they are simply invisible. */

/* ---------- progress line ----------
   A 3px gold line along the top edge of the viewport, over the header's top,
   scaled by how far the reader has come. Written by the page script. */
.dn-progress {
  position: fixed; left: 0; top: 0; right: 0;
  height: 3px;
  z-index: 11;
  pointer-events: none;
}
.dn-progress i {
  display: block; height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---------- hero ---------- */
.dn-hero .hero-grid { align-items: start; }
.dn-hero .crumbs { margin-bottom: 1rem; }
/* On navy the shared breadcrumb greys vanish; same values the customers page uses. */
.dn-hero .crumbs, .dn-hero .crumbs a { color: #C6D0E2; }
.dn-hero .crumbs a:hover { color: #FFF; }
.dn-hero .crumbs [aria-current] { color: #FFF; }
.dn-hero .crumbs li + li::before { color: var(--gold); }
.dn-index {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem 1.1rem;
  max-width: 26rem;
  margin: 0 auto;
  width: 100%;
}
.dn-index-h { margin: 0 0 0.6rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.dn-index ol { margin: 0; padding: 0 0 0 1.4rem; display: grid; gap: 0.3rem; counter-reset: dn; list-style: none; }
.dn-index li { counter-increment: dn; position: relative; font-size: 0.95rem; }
.dn-index li::before { content: counter(dn, decimal-leading-zero); position: absolute; left: -1.4rem; top: 0.1rem; font-size: 0.72rem; font-weight: 750; color: var(--gold); font-variant-numeric: tabular-nums; }
.dn-index a { color: #EDF1F8; text-decoration: none; }
.dn-index a:hover { color: #FFF; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- acts and chapters ---------- */
.dn-act { padding: 2.5rem 0 0; }
.dn-act-cont { padding-top: 0; }
.dn-act-lbl {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 0.5rem;
  font-size: 0.82rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-text);
}
.dn-act-lbl span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.75rem; height: 1.75rem; padding: 0 0.4rem;
  border-radius: 6px;
  background: var(--navy); color: var(--gold);
  font-size: 0.8rem; letter-spacing: 0.04em;
}
.dn-ch {
  display: grid; gap: 1.75rem; align-items: start;
  padding: 2.25rem 0 2.75rem;
  border-top: 1px solid var(--line);
}
.dn-num {
  display: inline-block;
  font-size: 0.86rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--gold-text);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.stage .dn-num { color: var(--gold); }
.dn-text h2 { margin: 0 0 0.9rem; }
.dn-text p { color: var(--grey); max-width: 52ch; margin: 0; }
.dn-text p + p { margin-top: 0.85rem; }
.dn-more { margin-top: 0.4rem; font-weight: 600; }
.dn-more a { color: var(--navy); }
.dn-more .tier { margin-right: 0.5rem; vertical-align: middle; }
.dn-demo { min-width: 0; }
.dn-sticky { max-width: 30rem; margin: 0 auto; }
@media (min-width: 1000px) {
  .dn-ch { grid-template-columns: 1fr 1fr; gap: 4rem; padding: 3.5rem 0 4rem; }
  .dn-ch:nth-of-type(even) .dn-text { order: 2; }
  /* 71px of sticky header, 3px of progress line over it, and a breath */
  .dn-sticky { position: sticky; top: calc(71px + 2.5rem); }
}

/* ---------- shared bits of the mocks ---------- */
.dn-before { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; white-space: nowrap; }
.dn-after { position: relative; }
.dn-pill {
  display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px;
  background: var(--soft); color: var(--grey); font-size: 0.72rem; font-weight: 650;
}
.dn-pill.ok { background: #ECFDF5; color: #065F46; }
.dn-tag {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 6px;
  background: var(--soft); border: 1px solid var(--line);
  font-size: 0.7rem; font-weight: 700; color: var(--ink);
}
.dn-tag.gold { background: #FDFAF2; border-color: rgba(212, 168, 71, 0.6); color: #7F6320; }

/* ---------- 01 the cart, three store themes ----------
   The same block as three different stores would show it: our classic navy, a
   boutique with a serif face, squared corners and a terracotta accent on cream,
   and a dark store. Every colour the block uses is a variable here, so one
   swatch changes the whole card. */
.dn-mock .mock { max-width: none; }
.dn-mock .mock-input { gap: 0.5rem; }
.dn-typed { flex: 1 1 auto; min-width: 0; font-weight: 650; letter-spacing: 1px; }
.dn-themed .mock { font-family: var(--mk-font, inherit); background: var(--mk-card, var(--paper)); color: var(--mk-text, var(--ink)); border-radius: var(--mk-r2, 16px); transition: background-color 0.3s ease, color 0.3s ease; }
.dn-themed .mock-bar { color: var(--mk-muted, var(--grey)); border-bottom-color: var(--mk-line, var(--line)); }
.dn-themed .mock-label { color: var(--mk-muted, var(--grey)); }
.dn-themed .mock-row { border-bottom-color: var(--mk-line, var(--line)); }
.dn-themed .mock-row b { color: var(--mk-muted, var(--grey)); }
.dn-themed .mock-check .box { background: var(--mk, var(--navy)); color: var(--mk-on, #FFF); border-radius: var(--mk-r, 6px); }
.dn-themed .mock-input { border-color: var(--mk, var(--ok)); border-radius: var(--mk-r3, 10px); }
.dn-themed .mock-input .valid { color: var(--mk-ok, var(--ok)); }
.dn-themed .mock-tag { background: var(--mk-soft, #ECFDF5); color: var(--mk-ink, #065F46); border-radius: var(--mk-r3, 10px); }
.dn-themed[data-theme="terra"] { --mk: #B5542A; --mk-ok: #B5542A; --mk-soft: #F6E7DC; --mk-ink: #7A3416; --mk-card: #FBF6EF; --mk-text: #2A1E16; --mk-muted: #8A7466; --mk-line: #E6D8C8; --mk-font: Georgia, "Times New Roman", serif; --mk-r: 2px; --mk-r2: 4px; --mk-r3: 3px; }
.dn-themed[data-theme="dark"] { --mk: #D4A847; --mk-on: #141A26; --mk-ok: #E8C56A; --mk-soft: rgba(212, 168, 71, 0.16); --mk-ink: #F3DFA6; --mk-card: #141A26; --mk-text: #F3F4F6; --mk-muted: #9AA3B2; --mk-line: rgba(255, 255, 255, 0.14); --mk-r: 999px; --mk-r2: 20px; --mk-r3: 999px; }
.dn-swatches { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.9rem; flex-wrap: wrap; }
.dn-swatches button {
  font: inherit; font-size: 0.82rem; font-weight: 650;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  cursor: pointer;
}
.dn-swatches button::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: -1px; background: var(--navy); }
.dn-swatches button[data-theme="terra"]::before { background: #B5542A; }
.dn-swatches button[data-theme="dark"]::before { background: #141A26; box-shadow: inset 0 0 0 2px #D4A847; }
.dn-swatches button.is-on { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(38, 55, 87, 0.15); }

/* ---------- 02 the order screen ---------- */
.dn-admin {
  background: #F1F2F4; border-radius: 14px; padding: 0.9rem;
  display: grid; gap: 0.75rem; font-size: 0.86rem; color: var(--ink);
  box-shadow: var(--e2);
}
.dn-adm-head { display: grid; gap: 0.5rem; }
.dn-adm-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 1rem; }
.dn-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.dn-card { background: var(--paper); border-radius: 10px; box-shadow: 0 1px 2px rgba(22, 32, 47, 0.08); overflow: hidden; }
.dn-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
.dn-status { position: relative; display: inline-block; font-size: 0.74rem; font-weight: 700; color: #065F46; }
.dn-status .dn-before { color: #7F6320; }
.dn-card-body { padding: 0.5rem 0.9rem; display: grid; gap: 0.35rem; }
.dn-kv { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; }
.dn-kv span { color: var(--grey); }
.dn-kv b { text-align: right; font-weight: 650; }
.dn-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0.6rem 0.9rem 0.8rem; }
.dn-btn {
  display: inline-block; padding: 0.38rem 0.7rem; border-radius: 8px;
  border: 1px solid #C9CDD4; background: #FFF; font-size: 0.76rem; font-weight: 650; color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
.dn-btn.pri { background: var(--navy); border-color: var(--navy); color: #FFF; }
.dn-activity { background: var(--paper); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.8rem; display: grid; gap: 0.3rem; }
.dn-activity b { font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey); }
.dn-act-line { position: relative; display: block; color: var(--ink); }
.dn-act-line .dn-before { white-space: normal; color: var(--grey); }

/* ---------- 03 when it is issued ---------- */
.dn-flow { display: grid; gap: 1.1rem; }
.dn-flow-row { display: grid; gap: 0.45rem; }
.dn-flow-lbl { font-size: 0.78rem; font-weight: 700; color: var(--grey); letter-spacing: 0.03em; text-transform: uppercase; }
.dn-nodes { display: flex; align-items: center; gap: 0; }
.dn-node {
  flex: 0 1 auto; min-width: 0; text-align: center;
  padding: 0.5rem 0.7rem; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--e1);
  font-size: 0.8rem; font-weight: 650; color: var(--ink);
}
.dn-node.doc { background: #FDFAF2; border-color: rgba(212, 168, 71, 0.7); }
.dn-rail { position: relative; flex: 1 1 2rem; min-width: 1.5rem; height: 2px; background: linear-gradient(90deg, var(--gold), rgba(212, 168, 71, 0.3)); transform-origin: left center; }
.dn-dot { position: absolute; top: 50%; left: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 168, 71, 0.25); }
@media (max-width: 420px) {
  .dn-node { font-size: 0.72rem; padding: 0.45rem 0.5rem; }
  .dn-rail { min-width: 1rem; }
  .dn-kv b { overflow-wrap: anywhere; }
  .dn-kp-body { grid-template-columns: 1fr; justify-items: center; }
  .dn-kp-list { width: 100%; }
}

/* ---------- 05 the delivery note ---------- */
.dn-label {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem; box-shadow: var(--e2); font-size: 0.84rem; color: var(--ink);
  display: grid; gap: 0.9rem; position: relative; overflow: hidden;
}
.dn-label::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gold); }
.dn-label-head { display: grid; gap: 0.1rem; padding-left: 0.4rem; }
.dn-label-head span { color: var(--grey); font-size: 0.78rem; }
.dn-label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; padding-left: 0.4rem; }
.dn-label-grid > div { display: grid; gap: 0.1rem; }
.dn-label-grid small { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); }
.dn-label-grid b { font-weight: 650; font-size: 0.82rem; }
.dn-label-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-left: 0.4rem; }
.dn-stamp {
  display: inline-block; padding: 0.3rem 0.6rem; border: 2px solid var(--navy); border-radius: 6px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--navy);
}
.dn-bars { display: inline-flex; gap: 2px; align-items: stretch; height: 1.6rem; }
.dn-bars i { display: block; width: 2px; background: var(--ink); }
.dn-bars i:nth-child(3n) { width: 4px; }
.dn-bars i:nth-child(5n) { width: 1px; }

/* ---------- 06 the email, two languages ---------- */
.dn-langs { display: flex; gap: 0.5rem; margin-bottom: 0.8rem; }
.dn-langs button {
  font: inherit; font-size: 0.82rem; font-weight: 650;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.dn-langs button.is-on { background: var(--navy); border-color: var(--navy); color: #FFF; }
.dn-mail { margin-top: 0; }
.dn-mail .dn-en { display: none; }
.dn-mail[data-lang="en"] .dn-en { display: inline; }
.dn-mail[data-lang="en"] .dn-el { display: none; }
.dn-cap { padding: 0.75rem 1.35rem 1rem; font-size: 0.8rem; color: var(--grey); border-top: 1px solid var(--line); background: var(--soft); }

/* ---------- 07 print ---------- */
.dn-print { background: #F1F2F4; border-radius: 14px; padding: 0.9rem; box-shadow: var(--e2); position: relative; min-height: 15rem; }
.dn-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.84rem; color: var(--ink); }
.dn-tb-back { color: var(--grey); font-size: 0.78rem; }
.dn-toolbar b { margin-right: auto; }
.dn-tb-btn { padding: 0.35rem 0.65rem; border-radius: 8px; border: 1px solid #C9CDD4; background: #FFF; font-size: 0.76rem; font-weight: 650; }
.dn-tb-btn.pri { background: var(--navy); border-color: var(--navy); color: #FFF; }
.dn-menu {
  position: absolute; right: 0.9rem; top: 3.4rem; width: 13rem;
  background: var(--paper); border-radius: 10px; box-shadow: var(--e3); border: 1px solid var(--line);
  padding: 0.35rem; display: grid; gap: 0.15rem; font-size: 0.8rem; z-index: 2;
  transform-origin: top right;
}
.dn-menu span { padding: 0.45rem 0.6rem; border-radius: 6px; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.dn-menu .dn-ours { background: #FDFAF2; font-weight: 700; }
.dn-t { display: inline-flex; align-items: center; justify-content: center; width: 1.2rem; height: 1.2rem; border-radius: 4px; background: var(--navy); color: var(--gold); font-size: 0.72rem; font-weight: 800; font-style: normal; }
.dn-sheet {
  margin: 2.6rem auto 0; width: 11rem; padding: 0.8rem 0.9rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--e2);
  display: grid; gap: 0.35rem; font-size: 0.68rem; color: var(--ink);
}
.dn-sheet b { font-size: 0.72rem; }
.dn-sheet span { color: var(--grey); font-family: var(--mono); font-size: 0.6rem; }
.dn-sheet i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.dn-sheet i:nth-of-type(2) { width: 70%; }
.dn-sheet i:nth-of-type(3) { width: 45%; }

/* ---------- 08 returns and corrections ---------- */
.dn-fix { display: grid; gap: 0.8rem; }
.dn-lines { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 0.82rem; }
.dn-line { display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem; align-items: center; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
.dn-line:last-child { border-bottom: 0; }
.dn-vat { position: relative; display: inline-block; min-width: 2.6rem; text-align: center; padding: 0.12rem 0.45rem; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: 0.76rem; }
.dn-vat .dn-after { color: #065F46; }
.dn-vat .dn-before { left: 0; right: 0; text-align: center; padding: 0.12rem 0; }
.dn-totals { display: grid; gap: 0.3rem; justify-items: end; font-size: 0.84rem; padding: 0 0.3rem; }
.dn-totals > div { display: grid; grid-template-columns: 8rem 6rem; gap: 0.5rem; }
.dn-totals span { color: var(--grey); }
.dn-totals b { text-align: right; font-variant-numeric: tabular-nums; }
.dn-swap { position: relative; display: block; }
.dn-swap .dn-before { left: auto; right: 0; }
.dn-sum { border-top: 1px solid var(--line); padding-top: 0.3rem; }
.dn-sum b { font-size: 0.95rem; }
.dn-credit {
  background: #FDFAF2; border: 1px solid rgba(212, 168, 71, 0.6); border-radius: 10px;
  padding: 0.7rem 0.9rem; display: grid; gap: 0.15rem; font-size: 0.8rem; color: var(--ink);
}
.dn-credit b { font-size: 0.74rem; letter-spacing: 0.04em; }
.dn-credit span { color: var(--grey); }
.dn-credit-amt { font-weight: 800; color: #B42318; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* ---------- 09 abroad ---------- */
.dn-abroad { display: grid; gap: 0.65rem; }
.dn-country {
  display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 0.8rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.9rem;
  box-shadow: var(--e1); font-size: 0.82rem; color: var(--ink);
}
.dn-country > div { display: grid; gap: 0.15rem; }
.dn-country span:not(.dn-cc):not(.dn-vies) { color: var(--grey); font-size: 0.78rem; }
/* Round flags, drawn inline (three rectangles, a square and a cross), no images. */
.dn-flag { display: inline-flex; width: 2.6rem; height: 2.6rem; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(22, 32, 47, 0.12); background: #FFF; }
.dn-flag svg { display: block; width: 100%; height: 100%; }
.dn-vies { display: inline-block; padding: 0.25rem 0.55rem; border: 2px solid #2F6F4E; border-radius: 6px; color: #2F6F4E; font-weight: 800; font-size: 0.72rem; transform: rotate(-6deg); }

/* ---------- 10 customers ---------- */
.dn-kp { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--e2); padding: 1rem 1.1rem; display: grid; gap: 0.9rem; font-size: 0.84rem; color: var(--ink); }
.dn-kp-head { display: grid; gap: 0.1rem; }
.dn-kp-head span { color: var(--grey); font-size: 0.78rem; }
.dn-kp-body { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center; }
.dn-ring {
  width: 6.2rem; height: 6.2rem; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p, 100) * 1%), #E2E6EE 0);
  display: grid; place-items: center; position: relative;
}
.dn-ring::before { content: ""; position: absolute; inset: 0.7rem; border-radius: 50%; background: var(--paper); }
.dn-ring b, .dn-ring span { position: relative; z-index: 1; }
.dn-ring b { font-size: 1.1rem; line-height: 1; }
.dn-ring span { font-size: 0.66rem; color: var(--grey); margin-top: 0.15rem; }
.dn-kp-list { display: grid; gap: 0.35rem; }
.dn-kp-list > div { display: flex; justify-content: space-between; gap: 0.75rem; }
.dn-kp-list span { color: var(--grey); }
.dn-kp-list b { font-variant-numeric: tabular-nums; }
.dn-kp-list .red b { color: #B42318; }
.dn-chart { display: flex; align-items: flex-end; gap: 4px; height: 3.2rem; padding-top: 0.2rem; border-top: 1px dashed var(--line); }
.dn-chart i { flex: 1 1 0; display: block; height: var(--h, 50%); background: var(--navy); border-radius: 3px 3px 0 0; transform-origin: bottom center; }
.dn-chart i:nth-child(3n) { background: var(--gold); }
.dn-kp-foot { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.dn-kp-foot span { padding: 0.3rem 0.6rem; border-radius: 999px; background: var(--soft); font-size: 0.74rem; font-weight: 650; color: var(--navy); }

/* ---------- 11 setup ---------- */
.dn-setup { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--e2); padding: 0.5rem 1rem 1rem; display: grid; font-size: 0.86rem; color: var(--ink); }
.dn-switch { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.dn-switch i { position: relative; flex: none; width: 2.6rem; height: 1.5rem; border-radius: 999px; background: #C9CDD4; transition: background-color 0.25s ease; }
.dn-switch i::before { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px); border-radius: 50%; background: #FFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.25s ease; }
.dn-switch.is-on i { background: var(--ok); }
.dn-switch.is-on i::before { transform: translateX(1.1rem); }
.dn-meter { display: grid; gap: 0.35rem; padding-top: 0.9rem; }
.dn-meter span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey); }
.dn-meter-bar { height: 0.6rem; border-radius: 999px; background: var(--soft); overflow: hidden; }
.dn-meter-bar i { display: block; height: 100%; width: var(--w, 50%); background: var(--gold); border-radius: 999px; transform-origin: left center; }
.dn-meter b { font-size: 0.82rem; font-weight: 650; }

@media (prefers-reduced-motion: reduce) {
  .dn-switch i, .dn-switch i::before { transition: none; }
}
@media print {
  .dn-progress, .dn-swatches, .dn-langs { display: none !important; }
  .dn-sticky { position: static; }
}
