/* Digital Done 4 You: Services & Pricing (Cobalt Ledger, see design.md).
   Everything is scoped to .dd-pricing so the rest of the site and theme stay untouched.
   Text lives in Gutenberg blocks; this file only styles them. */
.dd-pricing {
  --paper: oklch(0.985 0.004 255);
  --mist: oklch(0.955 0.012 258);
  --ink: oklch(0.23 0.045 262);
  --slate: oklch(0.47 0.025 260);
  --rule: oklch(0.90 0.012 258);
  --rule-strong: oklch(0.74 0.03 260);
  --cobalt: oklch(0.47 0.2 265);
  --cobalt-ink: oklch(0.40 0.18 265);
  --cobalt-soft: oklch(0.94 0.035 262);
  --on-cobalt: oklch(0.985 0.004 255);
  --danger: oklch(0.52 0.19 28);
  --shadow: 0 1px 0 var(--rule), 0 18px 40px -28px oklch(0.23 0.045 262 / .35);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));

  background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased; margin-block: 0 !important;
}
.dd-pricing *, .dd-pricing *::before, .dd-pricing *::after { box-sizing: border-box }
.dd-pricing [hidden] { display: none !important }   /* the theme has no global [hidden] rule; our grid/flex styles would otherwise show hidden parts */
html:has(.dd-pricing) { scroll-behavior: smooth; scroll-padding-top: 24px }

/* blocks reset inside the page */
.dd-pricing :where(h1, h2, h3) { font-family: var(--display); font-weight: 500; letter-spacing: -.015em; text-wrap: balance; color: var(--ink); margin: 0 }
.dd-pricing h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1.04 }
.dd-pricing h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1 }
.dd-pricing h3 { font-size: 1.375rem; line-height: 1.2 }
.dd-pricing p { margin: 0 }
.dd-pricing a { color: var(--cobalt-ink) }
.dd-pricing :focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 3px; border-radius: 3px }

/* sections: each top-level group is a band; its children sit in a 1160px column */
.dd-pricing > .band { padding: 72px var(--gutter-r) 72px var(--gutter-l); border-top: 1px solid var(--rule); margin: 0 !important }
.dd-pricing > .band > * { max-width: 1160px; margin-left: auto !important; margin-right: auto !important }
.dd-pricing > .band > * + * { margin-top: 14px }
.dd-pricing > .band > h2 + p { margin-top: 12px; color: var(--slate); max-width: 1160px }
.dd-pricing > .band > h2 + p, .dd-pricing > .band > h2 { padding-right: max(0px, calc(100% - 54rem)) }
.dd-pricing > .band > .dd-mount, .dd-pricing > .band > .dd-embed, .dd-pricing > .band > .terms, .dd-pricing > .band > .baseline { margin-top: 36px }
/* shortcode output: inherits the page; works inside or outside a .dd-pricing page */
.dd-pricing.dd-embed { background: transparent; margin: 0 }
.dd-pricing .eyebrow { font: 500 .8125rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt-ink) }
.dd-pricing .loading { color: var(--slate) }

/* buttons: core Button block + our own */
.dd-pricing .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px }
.dd-pricing .wp-block-button__link, .dd-pricing .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 4px; border: 1.5px solid var(--cobalt);
  background: var(--cobalt); color: var(--on-cobalt); font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s }
.dd-pricing .wp-block-button__link:hover, .dd-pricing .btn:hover { background: var(--cobalt-ink); border-color: var(--cobalt-ink); color: var(--on-cobalt) }
.dd-pricing .is-style-outline .wp-block-button__link, .dd-pricing .btn-quiet { background: transparent; color: var(--cobalt-ink) }
.dd-pricing .is-style-outline .wp-block-button__link:hover, .dd-pricing .btn-quiet:hover { background: var(--cobalt-soft); color: var(--cobalt-ink) }
.dd-pricing .btn-small { min-height: 40px; padding: 0 16px; font-size: .9375rem }
.dd-pricing .btn[disabled] { opacity: .55; cursor: progress }
.dd-pricing .linkbtn { background: none; border: 0; padding: 0; font: 600 .9375rem var(--body); color: var(--cobalt-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer }

/* hero */
.dd-pricing > .hero { border-top: 0; padding-top: 64px }
.dd-pricing .hero .wp-block-columns { gap: 56px; align-items: end; margin-bottom: 0 }
.dd-pricing .hero .wp-block-column > * + * { margin-top: 18px }
.dd-pricing .hero .lede { font-size: 1.1875rem; color: var(--slate); max-width: 54ch }
.dd-pricing ul.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule) }
/* label sits in a left gutter; the rest of the line (text, links) flows normally, so links never break the row */
.dd-pricing ul.facts li { position: relative; padding: 14px 0 14px 9.25rem; border-bottom: 1px solid var(--rule); font-size: .9688rem; margin: 0 }
.dd-pricing ul.facts li strong { position: absolute; left: 0; top: 14px; width: 8.5rem; font: 500 .8125rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--slate) }
@media (prefers-reduced-motion: no-preference) {
  .dd-pricing .hero .wp-block-column { animation: dd-rise .45s ease-out both }
  .dd-pricing .hero .wp-block-column + .wp-block-column { animation-delay: .08s }
  @keyframes dd-rise { from { opacity: 0; transform: translateY(8px) } }
}

/* bundles */
.dd-pricing .bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px }
.dd-pricing .bundle { display: grid; grid-template-rows: auto auto 1fr auto auto auto; gap: 12px; padding: 22px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; transition: border-color .15s, box-shadow .15s }
.dd-pricing .bundle:hover { border-color: var(--rule-strong); box-shadow: var(--shadow) }
.dd-pricing .bundle-for { font: 500 .78rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--slate) }
.dd-pricing .bundle h3 { font-size: 1.5rem }
.dd-pricing .bundle ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .9375rem }
.dd-pricing .bundle ul li { padding-left: 18px; position: relative; margin: 0 }
.dd-pricing .bundle ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border: 1.5px solid var(--cobalt); border-radius: 50% }
.dd-pricing .bundle-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-top: 1px solid var(--rule); padding-top: 12px }
.dd-pricing .bundle-price .p-start { font: 600 1.625rem/1 var(--display) }
.dd-pricing .bundle-price .p-start .num { font: 500 1.375rem var(--mono); font-variant-numeric: tabular-nums }
.dd-pricing .bundle-price .p-month { font: 500 .9375rem var(--mono); color: var(--slate) }
.dd-pricing .bundle-save { font-size: .875rem; color: var(--cobalt-ink); background: var(--cobalt-soft); border-radius: 4px; padding: 6px 10px; justify-self: start }
.dd-pricing .bundle .btn { justify-self: start }

/* builder */
.dd-pricing .builder { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: start }
.dd-pricing .group { margin-bottom: 28px }
.dd-pricing .group h3 { font-size: 1.25rem; padding-bottom: 8px; border-bottom: 1px solid var(--rule-strong) }
.dd-pricing .svc { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; min-height: 56px; transition: background .12s; margin: 0 }
.dd-pricing .svc:hover { background: var(--mist) }
.dd-pricing .svc input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--rule-strong); border-radius: 3px; display: grid; place-items: center; background: var(--paper); cursor: pointer }
.dd-pricing .svc input:checked { background: var(--cobalt); border-color: var(--cobalt) }
.dd-pricing .svc input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--on-cobalt); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) }
.dd-pricing .svc-name { font-weight: 600; font-size: 1rem }
.dd-pricing .svc-note { display: block; color: var(--slate); font-size: .875rem; font-weight: 400 }
.dd-pricing .svc-price { font: 500 .9375rem var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap }
.dd-pricing .svc-price small { display: block; color: var(--slate); font-size: .78rem }

.dd-pricing .ledger { position: sticky; top: 24px }
.admin-bar .dd-pricing .ledger { top: 56px }
.dd-pricing .ledger-in { background: var(--mist); border-radius: 6px; padding: 24px; display: grid; gap: 14px }
.dd-pricing .ledger h3 { font-size: 1.5rem }
.dd-pricing .empty { color: var(--slate); font-size: .9375rem }
.dd-pricing .lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9375rem }
.dd-pricing .lines li { display: flex; justify-content: space-between; gap: 12px; margin: 0 }
.dd-pricing .lines li span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap }
.dd-pricing .lines .in-bundle { color: var(--slate) }
.dd-pricing .lines .in-bundle span:last-child { text-decoration: line-through }
.dd-pricing .applied { font-size: .875rem; color: var(--cobalt-ink); background: var(--cobalt-soft); border-radius: 4px; padding: 8px 10px }
.dd-pricing .sum { border-top: 3px double var(--rule-strong); padding-top: 12px; display: grid; gap: 6px }
.dd-pricing .sum .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px }
.dd-pricing .sum .big { font: 600 1.375rem/1.2 var(--display) }
.dd-pricing .sum .big span:last-child { font: 500 1.375rem var(--mono); font-variant-numeric: tabular-nums }
.dd-pricing .sum .month span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums }
.dd-pricing .pay { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .875rem; color: var(--slate) }
.dd-pricing .pay li { margin: 0 }
.dd-pricing .ledger .btn { width: 100% }
.dd-pricing .ledger-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center }
.dd-pricing .copied { font-size: .875rem; color: var(--slate) }
.dd-pricing .tick { animation: dd-tick .18s ease-out }
@keyframes dd-tick { from { opacity: .35 } }

/* request form */
.dd-pricing #send { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--rule) }
.dd-pricing .send-head { display: grid; gap: 12px; max-width: 46rem; margin-bottom: 28px }
.dd-pricing .send-head p:last-child { color: var(--slate) }
.dd-pricing .plan-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; max-width: 860px }
.dd-pricing .field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0 }
.dd-pricing .field-wide { grid-column: 1 / -1 }
.dd-pricing .field label, .dd-pricing .field legend { font-weight: 600; font-size: .9375rem; padding: 0 }
.dd-pricing .opt { font-weight: 400; color: var(--slate) }
.dd-pricing input:not([type=checkbox]):not([type=radio]), .dd-pricing textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule-strong); border-radius: 4px; padding: 10px 12px; min-height: 46px; width: 100% }
.dd-pricing textarea { resize: vertical }
.dd-pricing input:focus, .dd-pricing textarea:focus { border-color: var(--cobalt); outline: none; box-shadow: 0 0 0 3px var(--cobalt-soft) }
.dd-pricing .choices { display: flex; flex-wrap: wrap; gap: 8px 22px }
.dd-pricing .choices label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400 }
.dd-pricing .choices input { width: 18px; height: 18px; accent-color: var(--cobalt); margin: 0 }
.dd-pricing .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden }
.dd-pricing .form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px }
.dd-pricing .form-msg { font-size: .9375rem }
.dd-pricing .form-msg.err { color: var(--danger) }
.dd-pricing .invalid { border-color: var(--danger) !important }

/* payment terms: groups of heading + paragraph */
.dd-pricing .terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 40px }
.dd-pricing .terms > .wp-block-group { padding: 18px 0; border-top: 1px solid var(--rule); margin: 0 }
.dd-pricing .terms h3 { font: 600 1.1875rem/1.3 var(--display); margin-bottom: 6px }
.dd-pricing .terms p { color: var(--slate) }

/* on every website */
.dd-pricing ul.baseline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 24px }
.dd-pricing ul.baseline li { border-top: 2px solid var(--cobalt); padding-top: 14px; color: var(--slate); margin: 0 }
.dd-pricing ul.baseline li strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px }

/* questions (core Details blocks) */
.dd-pricing .wp-block-details { border-top: 1px solid var(--rule); margin-top: 0 !important }
.dd-pricing .wp-block-details:last-of-type { border-bottom: 1px solid var(--rule) }
.dd-pricing h2 + .wp-block-details { margin-top: 28px !important }
.dd-pricing .wp-block-details summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; list-style: none; position: relative }
.dd-pricing .wp-block-details summary::-webkit-details-marker { display: none }
.dd-pricing .wp-block-details summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 500 1.375rem var(--mono); color: var(--cobalt) }
.dd-pricing .wp-block-details[open] summary::after { content: "\2212" }
.dd-pricing .wp-block-details p { padding: 0 0 18px; color: var(--slate); max-width: 65ch }

.dd-pricing .fineprint { color: var(--slate); font-size: .875rem }

/* phone: sticky total bar */
.dd-pricing .mobile-bar { display: none }
@media (max-width: 900px) {
  .dd-pricing .hero .wp-block-columns { flex-wrap: wrap !important; gap: 36px }
  .dd-pricing .hero .wp-block-column { flex-basis: 100% !important }
  .dd-pricing .builder { grid-template-columns: minmax(0, 1fr) }
  .dd-pricing .ledger { position: static }
  .dd-pricing .mobile-bar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--paper); border-top: 1px solid var(--rule-strong);
    padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l) }
  .dd-pricing .mb-total { display: grid; font: 500 1.125rem/1.25 var(--mono); font-variant-numeric: tabular-nums }
  .dd-pricing .mb-month { font-size: .8125rem; color: var(--slate) }
  body.has-plan { padding-bottom: 76px }
}
@media (max-width: 560px) {
  .dd-pricing > .band { padding-top: 52px; padding-bottom: 52px }
  .dd-pricing .plan-form { grid-template-columns: minmax(0, 1fr) }
  .dd-pricing ul.facts li { padding-left: 0 }
  .dd-pricing ul.facts li strong { position: static; display: block; width: auto; margin-bottom: 2px }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.dd-pricing) { scroll-behavior: auto }
  .dd-pricing *, .dd-pricing *::before, .dd-pricing *::after { animation: none !important; transition: none !important }
}
