/* standard.css — the standards mark, variant B «the seal» (owner-approved 2026-11-15)
 * Contract = engine/docs/standards_mark.md · catalogue = design_system §3.95 · markup = engine/tools/standard_mark.py.
 * The build adds this sheet only to a chapter page whose slot it filled. Our own engraved roundel: two rings and four
 * ticks, the framework's short name over its band. Line work only — no fill colour, gradient, ribbon, star or gold.
 * Text is ink / muted; the app accent touches the seal lines alone, so the mark is quiet on every app. */

.estd-host { container-type: inline-size; display: block; }
.estd-host[hidden] { display: none; }
/* first section only (standards_mark.md §4): the build puts the slot inside the first section card, so the app's own
   section switch shows and hides it — nothing here. Slide mode: the deck shows its own copy on the title slide. */
.section-card > .estd-host { margin: -16px 0 10px; }   /* right under the top bar: the section's own top padding already spaces it (owner 11-18: a tall gap above) */
html[data-edux-slide] .estd-host { display: none !important; }

/* folded (owner 11-18): small BADGES — a round seal + its short label, light accent fill and line — and a «›» toggle; no bar,
   no card. Unfolded: the lead + the standard lines open in place under them (`.estd__detail`). */
.estd {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 44px; margin: -9px 0; padding: 2px 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--color-ink, #2a2d4f); background: none; border: 0; border-radius: 999px;
}
.estd:focus-visible { outline: 2px solid var(--color-ink, #2a2d4f); outline-offset: 3px; }
.estd__badges { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.estd__badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 13px 3px 4px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--color-accent-deep, #3b4cc7) 40%, transparent);
  background: color-mix(in srgb, var(--color-accent-soft, #eef0ff) 85%, var(--color-surface, #fff));
  transition: background-color .2s cubic-bezier(.16, 1, .3, 1);
}
.estd:hover .estd__badge { background: color-mix(in srgb, var(--color-accent-soft, #eef0ff) 100%, var(--color-accent-deep, #3b4cc7) 8%); }
.estd__bl { font: 700 13px/1 var(--font-display, system-ui, sans-serif); letter-spacing: .01em; white-space: nowrap; color: var(--color-ink, #2a2d4f); }
.estd__detail { margin: 8px 0 0; padding: 4px 0 4px 14px; border-left: 3px solid color-mix(in srgb, var(--color-accent-deep, #3b4cc7) 40%, transparent); }
.estd__detail[hidden] { display: none; }

.estd-seal { display: block; width: 32px; height: 32px; flex: none; color: var(--color-accent-deep, #3b4cc7); }
/* ⛔ the seal's parts take ONE class each, never `.estd-seal .estd-seal__face`: the build's dedupe pass
   (engine/tools/dedupe_svg_images.py) folds a seal that repeats on the page (mark + slide footer) into
   `<symbol>` + `<use>`, and a descendant selector cannot reach into the `<use>` copy — the face and words fell back
   to black (owner 11-16: «solid black circles»). check_standard_mark.py fails a descendant selector here. */
.estd-seal__face { fill: var(--color-surface, #fff); stroke: currentColor; stroke-width: 1.3; }
.estd-seal__ring { fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: .55 1.754; opacity: .55; }
.estd-seal__tick, .estd-seal__rule { fill: none; stroke: currentColor; stroke-linecap: round; }
.estd-seal__tick { stroke-width: 1.4; }
.estd-seal__rule { stroke-width: .8; }
.estd-seal__n, .estd-seal__b { font-family: var(--font-display, system-ui, sans-serif); fill: var(--color-ink, #2a2d4f); stroke: none; text-anchor: middle; }
.estd-seal__n { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.estd-seal__b { font-size: 9px; font-weight: 500; letter-spacing: .02em; }

/* unfolded (owner 11-19 «2줄이면 충분해»): at most two short lines — «CSTA Gr 3–5 · Algorithms & Programming» — each one the
   button to the sheet (the skill sentence, code and official link live there). No lead, no sentence, no third line. */
.estd__row { display: flex; align-items: center; gap: .45em; max-width: 100%; min-height: 44px; margin: -6px 0; padding: 2px 0; border: 0; background: none;
  font: 500 15px/1.3 inherit; color: var(--color-muted, #5e637f); text-align: left; cursor: pointer; }
span.estd__row { cursor: default; min-height: 0; margin: 0; }
.estd__row:focus-visible { outline: 2px solid var(--color-ink, #2a2d4f); outline-offset: 2px; border-radius: 4px; }
.estd__fw { font-weight: 700; color: var(--color-ink, #2a2d4f); white-space: nowrap; letter-spacing: .01em; }
.estd__strand { min-width: 0; }   /* never cut (owner 11-19 «잘렸어» on the role tag) — a narrow phone may wrap it */
.estd__strand::before { content: "· "; }
.estd__go { display: grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--color-muted, #5e637f); }
.estd__go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.estd__row:hover .estd__strand { color: var(--color-ink, #2a2d4f); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.estd__more { display: grid; place-items: center; width: 22px; height: 28px; color: var(--color-muted, #5e637f); }
.estd__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.estd[aria-expanded="true"] .estd__more svg { transform: rotate(90deg); }

/* narrow phones: the badge row stays small */
@container (max-width: 400px) {
  .estd__badge { gap: 5px; padding-right: 10px; }
  .estd__bl { font-size: 12px; }
  .estd-seal { width: 28px; height: 28px; }
  .estd__row { font-size: 14px; }
}

/* ── the sheet (a dialog: a bottom sheet on a phone) ── */
dialog.estd-dialog {
  border: 0; padding: 0; width: min(100vw, 480px); max-width: 100vw; max-height: 86dvh; overflow: auto;
  border-radius: 20px; box-shadow: 0 18px 48px -12px rgba(26, 28, 56, .35); overscroll-behavior: contain;
  color: var(--color-ink, #2a2d4f); background: var(--color-surface, #fff);
}
dialog.estd-dialog::backdrop { background: rgba(26, 28, 56, .42); }
@media (max-width: 560px) { dialog.estd-dialog { margin: auto 0 0; width: 100vw; border-radius: 20px 20px 0 0; } }
.estd-sheet { padding: 8px 20px 22px; }
.estd-sheet__top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.estd-sheet__top h2 { flex: 1; margin: 0; font: 600 1.25rem/1.2 var(--font-display, system-ui, sans-serif); letter-spacing: -.005em; }
.estd-sheet__x { width: 44px; height: 44px; margin-right: -12px; border: 0; background: none; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--color-muted, #5e637f); }
.estd-sheet__x:hover { background: #f3f3f8; }
.estd-sheet__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.estd-std { padding: 16px 0; border-top: 1px solid var(--color-hairline, #e3e5f1); }
.estd-std__name { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.35; }
.estd-std__meta { margin: 2px 0 10px; font-size: 14px; color: var(--color-muted, #5e637f); }
.estd-std__plain { margin: 0 0 12px; font-size: 18px; line-height: 1.4; text-wrap: pretty; }
.estd-std__code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0; font-size: 14px; color: var(--color-muted, #5e637f); }
.estd-std__code code { font: 500 14px var(--font-mono, ui-monospace, monospace); color: var(--color-ink, #2a2d4f); background: #f3f3f8;
  padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.estd-std__code a, .estd-sheet__note a { color: var(--color-ink, #2a2d4f); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.estd-std__also { margin: 8px 0 0; font-size: 14px; color: var(--color-muted, #5e637f); }
.estd-std__also code { font: 500 13px var(--font-mono, ui-monospace, monospace); }
.estd-sheet__note { margin: 0; padding-top: 14px; border-top: 1px solid var(--color-hairline, #e3e5f1); font-size: 14px; line-height: 1.5; color: var(--color-muted, #5e637f); }
.estd-sheet__note + .estd-sheet__note { border-top: 0; padding-top: 6px; }

/* ── the teacher slide footer (EDUXStandard.slide()) — sized in the deck's em, the same fold: badges, tap → the lines with codes.
   The lines open UPWARD over the slide (the footer has no room under them) on a soft card the teacher can read from the back ── */
.estd-slide { position: relative; font-size: 1em; }
.estd--slide { font-size: 1em; }
.estd--slide .estd-seal { width: 2.2em; height: 2.2em; }
.estd--slide .estd__bl { font-size: .95em; }
.estd--slide .estd__badge { gap: .5em; padding: .2em .9em .2em .25em; }
.estd--slide .estd__more { width: 1.6em; height: 2em; }
.estd__detail--slide { position: absolute; left: 0; bottom: calc(100% + .5em); z-index: 5; width: max-content; max-width: min(46em, 90vw); margin: 0;
  padding: .7em 1em; border-left: 0; border-radius: .8em; background: #fff; box-shadow: 0 .4em 1.6em rgba(26, 28, 56, .25), 0 0 0 1px rgba(26, 28, 56, .1); }
.estd--slide ~ .estd__detail .estd__row, .estd__detail--slide .estd__row { font-size: 1.1em; }

@media (prefers-reduced-motion: reduce) { .estd__badge, .estd__more svg { transition: none; } }
