/* =========================================================================
   Demo kit — modules added to the template concepts for the marketing-site
   demos (page banner, schedule, event pages, articles, forms...).

   Everything is drawn from the concept's own tokens (--brand-*, --c-*,
   --step-*, .shell), so a module re-skins with the template and with the
   theme switcher. Nothing here may set a colour of its own.
   ========================================================================= */

/* The QA panel stays in the DOM (demo.js drives its controls) but is never shown. */
.concept-controls { display: none !important; }

.dk-banner,
.dk-section { color: var(--c-text); }
.dk-banner {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--brand-primary) 14%, transparent), transparent 55%),
    var(--c-surface);
  border-bottom: 1px solid var(--c-line);
}
.dk-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; color: var(--c-muted); margin-bottom: 1.6rem; }
.dk-crumbs a { color: inherit; text-underline-offset: .2em; }
.dk-crumbs a:hover { color: var(--c-text); }
.dk-crumbs [aria-current] { color: var(--c-text); }
.dk-eyebrow {
  margin: 0 0 .8rem; font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: color-mix(in srgb, var(--brand-primary) 70%, var(--c-text));
}
.dk-title { font-family: var(--brand-heading-font); font-size: var(--step-4); line-height: 1; margin: 0; max-width: 18ch; text-wrap: balance; }
.dk-lede { margin: 1.1rem 0 0; max-width: 46rem; font-size: var(--step-1); color: var(--c-muted); }
.dk-banner__chips { margin: 1.3rem 0 0; }

.dk-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.dk-section--alt { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.dk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.8rem; }
.dk-head h2, .dk-subhead, .dk-form h2, .dk-panel h2 { font-family: var(--brand-heading-font); font-size: var(--step-2); line-height: 1.1; margin: 0; }
.dk-subhead { margin: 2.6rem 0 1.2rem; }
.dk-note { margin: .6rem 0 0; color: var(--c-muted); max-width: 44rem; }
.dk-more { margin: 1.6rem 0 0; }
.dk-arrow { color: var(--c-text); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--brand-primary); padding-bottom: .1rem; }
.dk-arrow:hover { color: var(--brand-primary); }
.dk-actions { margin: 2rem 0 0; }

/* Status chips: always words, colour only reinforces them. */
.dk-chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; border: 1px solid var(--c-line-strong, var(--c-line)); color: var(--c-text);
}
.dk-chip::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c-muted); }
.dk-chip--open::before { background: var(--brand-primary); }
.dk-chip--sched::before { background: var(--brand-accent); }
.dk-chip--sold::before { background: transparent; box-shadow: inset 0 0 0 2px var(--c-muted); }
.dk-chip--tbc::before { background: transparent; box-shadow: inset 0 0 0 2px var(--brand-accent); }

/* Schedule */
.dk-sched { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.dk-sched__row { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 1.2rem 1.6rem; align-items: center; padding: 1.3rem 0; border-bottom: 1px solid var(--c-line); }
.dk-sched__date { margin: 0; display: grid; line-height: 1.1; }
.dk-sched__day { font-family: var(--brand-heading-font); font-size: var(--step-3); }
.dk-sched__mon { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); }
.dk-sched__round { margin: 0 0 .2rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.dk-sched__title { margin: 0; font-size: var(--step-1); font-family: var(--brand-heading-font); }
.dk-sched__title a { color: inherit; text-decoration: none; }
.dk-sched__title a:hover { text-decoration: underline; text-decoration-color: var(--brand-primary); text-underline-offset: .2em; }
.dk-sched__meta { margin: .3rem 0 0; color: var(--c-muted); }
.dk-sched__side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .8rem 1.2rem; }
.dk-sched--past .dk-sched__day { color: var(--c-muted); }
@media (max-width: 640px) {
  .dk-sched__row { grid-template-columns: 4rem 1fr; }
  .dk-sched__side { grid-column: 2; justify-content: flex-start; }
}

/* Tables */
.dk-table-wrap { overflow-x: auto; }
.dk-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dk-table caption { text-align: left; color: var(--c-muted); font-size: .85rem; padding-bottom: .8rem; }
.dk-table th, .dk-table td { text-align: left; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.dk-table thead th { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); font-weight: 700; }
.dk-table tbody th { font-weight: 700; }
.dk-table--plain { margin-top: .4rem; }
.dk-table--plain th { width: 9rem; white-space: nowrap; color: var(--c-muted); font-weight: 600; }

/* Prose, facts, cards */
.dk-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .dk-split { grid-template-columns: 1fr; } }
.dk-prose p { margin: 0 0 1.1rem; max-width: 42rem; line-height: 1.65; }
.dk-lead { font-size: var(--step-1); line-height: 1.5; }
.dk-facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--c-line); }
.dk-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--c-line); }
.dk-facts dt { color: var(--c-muted); font-size: .85rem; letter-spacing: .04em; }
.dk-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dk-facts a { color: inherit; text-decoration-color: var(--brand-primary); text-underline-offset: .2em; }
.dk-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); }
.dk-card { background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--r-sm, 4px); padding: 1.5rem 1.4rem 1.6rem; display: grid; gap: .5rem; align-content: start; }
.dk-section--alt .dk-card { background: var(--c-bg); }
.dk-section:not(.dk-section--alt) .dk-card { background: var(--c-surface); }
.dk-card h3 { margin: 0; font-family: var(--brand-heading-font); font-size: var(--step-1); line-height: 1.2; }
.dk-card h3 a { color: inherit; text-decoration: none; }
.dk-card h3 a::after { content: ""; position: absolute; inset: 0; }
.dk-card:has(h3 a) { position: relative; transition: border-color var(--t-fast, .2s) var(--ease, ease), transform var(--t-fast, .2s) var(--ease, ease); }
.dk-card:has(h3 a):hover { border-color: var(--brand-primary); transform: translateY(-2px); }
.dk-card p { margin: 0; color: var(--c-muted); }
.dk-card .dk-chip { justify-self: start; margin-top: .4rem; }
.dk-card__role { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.dk-avatar {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; margin-bottom: .4rem;
  background: var(--brand-primary); color: var(--c-on-primary, var(--c-bg));
}
.dk-tier { border-top: 3px solid var(--brand-primary); }
.dk-ticks { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .55rem; }
.dk-ticks li { padding-left: 1.4rem; position: relative; }
.dk-ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .35rem; border-left: 2px solid var(--brand-primary); border-bottom: 2px solid var(--brand-primary); transform: rotate(-45deg); }
.dk-faq details { border-top: 1px solid var(--c-line); }
.dk-faq details:last-child { border-bottom: 1px solid var(--c-line); }
.dk-faq summary { cursor: pointer; padding: 1.1rem 0; font-weight: 700; }
.dk-faq details p { margin: 0 0 1.2rem; color: var(--c-muted); max-width: 44rem; }

/* Event and article layouts */
.dk-event { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .dk-event { grid-template-columns: 1fr; } }
.dk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1px; margin: 1.6rem 0; background: var(--c-line); border: 1px solid var(--c-line); }
.dk-stats div { background: var(--c-bg); padding: 1rem 1.1rem; }
.dk-stats dt { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.dk-stats dd { margin: .3rem 0 0; font-family: var(--brand-heading-font); font-size: var(--step-1); }
.dk-info { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin-top: 2.2rem; }
.dk-info h3 { margin: 0 0 .4rem; font-size: 1rem; }
.dk-info p { margin: 0; color: var(--c-muted); }
.dk-panel { position: sticky; top: 6rem; background: var(--c-surface); border: 1px solid var(--c-line); border-top: 4px solid var(--brand-primary); border-radius: var(--r-sm, 4px); padding: 1.6rem; display: grid; gap: .9rem; }
.dk-panel__when { margin: 0; color: var(--c-muted); font-size: .9rem; }
.dk-panel .dk-chip { justify-self: start; }
.dk-article { max-width: 46rem; }
.dk-article p { line-height: 1.7; margin: 0 0 1.2rem; }
.dk-quote { margin: 2rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--brand-primary); }
.dk-quote p { font-family: var(--brand-heading-font); font-size: var(--step-2); line-height: 1.2; margin: 0; }

/* Forms */
.dk-form { display: grid; gap: 1rem; max-width: 36rem; }
.dk-field { display: grid; gap: .4rem; }
.dk-field label { font-size: .82rem; font-weight: 700; letter-spacing: .04em; }
.dk-field input, .dk-field select, .dk-field textarea {
  font: inherit; color: var(--c-text); background: var(--c-bg); border: 1.5px solid var(--c-line-strong, var(--c-line));
  border-radius: var(--r-sm, 4px); padding: .75rem .9rem; width: 100%;
}
.dk-field input:focus-visible, .dk-field select:focus-visible, .dk-field textarea:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 1px; border-color: var(--brand-primary); }
.dk-form button { justify-self: start; }
.dk-form__status { margin: 0; min-height: 1.4em; font-weight: 600; }
.dk-form__status[data-state="ok"]::before { content: "✓ "; color: var(--brand-primary); }

.dk-empty { border: 1.5px dashed var(--c-line-strong, var(--c-line)); border-radius: var(--r-sm, 4px); padding: 1.6rem; max-width: 44rem; }
.dk-empty h3 { margin: 0 0 .5rem; }
.dk-empty p { margin: 0; color: var(--c-muted); }

/* Toast for links that would leave the demo */
.dk-toast {
  position: fixed; left: 50%; bottom: 1.2rem; z-index: 1000; transform: translate(-50%, 1rem); opacity: 0;
  max-width: min(32rem, calc(100% - 2rem)); padding: .85rem 1.1rem; border-radius: 6px;
  background: var(--c-text); color: var(--c-bg); font-size: .92rem; line-height: 1.4; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5);
  transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.dk-toast[data-show] { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .dk-toast { transition: none; } }

/* Ribbon shown when a demo page is opened outside the marketing-site previewer */
.dk-ribbon {
  position: fixed; inset: auto 0 0 0; z-index: 999; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1.2rem;
  padding: .6rem 1rem; background: #0b0b0d; color: #f4f2ed; font: 600 .8rem/1.3 system-ui, sans-serif; letter-spacing: .02em;
  border-top: 3px solid #ff5a00;
}
.dk-ribbon a { color: #ff7426; }
body.dk-has-ribbon { padding-bottom: 3.2rem; }
