.sf { max-width: 900px; padding-bottom: 40px; }
.sf-nav { display: flex; align-items: center; gap: 24px; padding: 22px max(24px, calc((100vw - 1112px) / 2)); border-bottom: 1px solid var(--d-line); }
.sf-nav a { color: var(--d-ink); font-weight: 700; }
.sf-brand { margin-right: auto; text-decoration: none; }
.sf-nav details { position: relative; }
.sf-nav summary { cursor: pointer; padding: 10px; }
.sf-nav details div { position: absolute; right: 0; padding: 18px; background: white; border: 1px solid var(--d-line); min-width: 180px; z-index: 5; }
.sf-nav details a { display: block; margin: 12px 0; }
/* Shared public navigation: explicit hiding for the CSP-safe local controller. */
[data-local-nav] [hidden] { display: none !important; }
.sf-intro { padding: 32px 0 16px; }
.sf h1 { font: 700 clamp(2rem, 4vw, 3rem)/1.12 var(--cr-display); letter-spacing: -.03em; color: var(--d-ink); }
.sf h2, .sf h3 { font-family: var(--cr-display); color: var(--d-ink); }
.sf p { line-height: 1.7; color: var(--d-slate); }
.sf-privacy, .sf-danger { padding: 18px 24px; border-radius: 12px; border: 1px solid var(--d-line); margin: 20px 0; }
.sf-privacy { background: var(--d-warm); }
.sf-danger { border-left: 4px solid var(--d-pink); }
.sf-privacy h2, .sf-danger h2 { font-size: 1.15rem; margin: 0 0 8px; }
.sf-privacy p, .sf-danger p { margin: 0; font-size: .92rem; }
.sf-sections { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 22px 0; border-block: 1px solid var(--d-line); margin: 28px 0; }
.sf-sections a { font-size: .85rem; color: var(--d-ink); }
.sf section[id] { scroll-margin-top: 24px; }
#sf-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
#concern-form section { border-bottom: 1px solid var(--d-line); padding: 12px 0 28px; }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.sf-field { margin: 18px 0; min-width: 0; }
.sf label { display: block; font-weight: 600; color: var(--d-ink); line-height: 1.6; }
.sf label span { font-size: .8rem; font-weight: 400; color: var(--d-slate); }
.sf input:not([type=checkbox]), .sf select, .sf textarea { display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--d-line); border-radius: 8px; font: inherit; background: white; margin-top: 8px; color: var(--d-ink); }
.sf textarea { resize: vertical; }
.sf .sf-help { font-size: .85rem; margin: 8px 0; }
.sf-choices { padding: 18px; border: 1px solid var(--d-line); border-radius: 10px; }
.sf-choices label { display: flex; align-items: start; gap: 12px; padding: 10px 0; font-size: .92rem; }
.sf input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; }
.sf a:focus-visible, .sf button:focus-visible, .sf input:focus-visible, .sf textarea:focus-visible, .sf select:focus-visible, .sf-nav :focus-visible { outline: 3px solid var(--d-pink); outline-offset: 3px; }
.sf-record { padding: 28px; margin: 24px 0; border: 1px solid var(--d-line); border-radius: 12px; }
.sf-record header { border-bottom: 1px solid var(--d-line); margin-bottom: 24px; }
.sf-record dt { font-weight: 700; margin-top: 16px; }
.sf-record dd { margin: 6px 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.sf-follow-up div { border-bottom: 1px solid var(--d-line); padding: 12px 0 40px; }
.sf-clear { padding: 28px 0; }
.sf-clear p, .sf-attribution { font-size: .85rem; }
.sf-output-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.sf-output-actions .btn { min-height: 48px; }
.sf button:disabled { cursor: wait; opacity: .6; }
#download-record:disabled { cursor: not-allowed; }
.sf-sources { border-top: 1px solid var(--d-line); padding-top: 24px; }
.sf-sources li { line-height: 1.7; margin: 12px 0; }
.sf [hidden], .sf-print-unready { display: none !important; }
@media (max-width: 600px) { .sf-grid { grid-template-columns: 1fr; } .sf-record { padding: 18px; } .sf-nav { gap: 12px; } }
/* Keep the contact button in page flow: never cover editing or PDF actions. */
.sf-screen .wa-fab { position: static; display: flex; width: max-content; min-width: 54px; margin: 24px 24px 24px auto; }
@page { size: A4; margin: 18mm; }
@media print {
  body, #content { background: white !important; color: black !important; }
  .sf-screen { display: none !important; }
  .sf-print-unready { display: block !important; }
  body.sf-print-ready .sf-screen { display: block !important; }
  body.sf-print-ready .sf-screen * { display: none !important; }
  body.sf-print-ready .sf-screen .sf, body.sf-print-ready #review,
  body.sf-print-ready #record-document, body.sf-print-ready #record-document * { display: block !important; }
  body.sf-print-ready #record-document [hidden], body.sf-print-ready .sf-print-unready,
  #checkout-overlay, #sr-status, .skip-link { display: none !important; }
  /* The site footer is page chrome, never part of the printed record. */
  .sf-screen .ft-wrap { display: none !important; }
  .sf, #review { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .sf-record { border: 0; padding: 0; margin: 0; font: 11pt/1.5 sans-serif; }
  .sf-record h2 { font-size: 20pt; }
  .sf-record h3 { font-size: 13pt; break-after: avoid; }
  .sf-record dt { break-after: avoid; }
  .sf-record dd { orphans: 3; widows: 3; }
  .sf-record header, .sf-follow-up div { break-inside: avoid; }
  .sf-record p { color: black; }
}

/* Recording workspace: calm context, clear section cards and persistent navigation. */
@media screen {
  .sf-screen { background: #f7f8fb; }
  .sf { max-width: 1112px; }
  .sf-nav { background: white; padding-block: 16px; }
  .sf-brand { display: flex; align-items: center; gap: 10px; font-family: var(--cr-display); font-size: 1.15rem; }
  .sf-nav > a:not(.sf-brand) { text-decoration: none; font-size: .9rem; }
  .sf-nav summary { font-size: .9rem; border: 1px solid var(--d-line); border-radius: 8px; }
  .sf-intro { padding: 24px 0 8px; max-width: 820px; }
  .sf h1 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); max-width: 25ch; margin: 16px 0; }
  .sf-intro > p:last-child { max-width: 70ch; font-size: 1rem; line-height: 1.6; }
  .sf-notices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .sf-privacy, .sf-danger { margin: 12px 0; padding: 18px 20px; background: white; }
  .sf-privacy { background: #edf5f1; border-color: #d4e5da; }
  .sf-privacy p, .sf-danger p { font-size: .82rem; line-height: 1.6; }
  .sf-privacy h2, .sf-danger h2 { font-size: 1rem; line-height: 1.3; }
  .sf-guidance { margin: 12px 0 28px; }
  .sf-guidance summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--d-ink); padding: 10px 0; }
  .sf-guidance p { font-size: .88rem; max-width: 85ch; }
  .sf-workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
  .sf-workspace:has(#review:not([hidden])) { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin-inline: auto; }
  .sf-workspace:has(#review:not([hidden])) > .sf-sections { display: none; }
  .sf-main { min-width: 0; }
  .sf-sections { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 12px 0; }
  .sf-sections a { padding: 12px 14px; border-radius: 8px; text-decoration: none; font-size: .86rem; line-height: 1.4; }
  .sf-sections a:hover, .sf-sections a:focus-visible { background: #e8ecf3; }
  #sf-status:empty { display: none; }
  #sf-status:not(:empty) { padding: 14px 18px; background: #edf5f1; border-radius: 8px; }
  #concern-form section { padding: 26px 28px; background: white; border: 1px solid var(--d-line); border-radius: 14px; margin-bottom: 20px; }
  #concern-form h2 { font-size: 1.25rem; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.02em; }
  #concern-form section > p { font-size: .88rem; margin: 0 0 16px; }
  .sf-field { margin: 16px 0; }
  .sf label { font-size: .9rem; }
  .sf label span { font-size: .75rem; }
  .sf input:not([type=checkbox]), .sf select, .sf textarea { border-color: #c9d0dc; border-radius: 8px; font-size: .95rem; padding: 12px 14px; }
  .sf textarea { min-height: 130px; }
  #account { min-height: 190px; }
  .sf .sf-help { font-size: .79rem; line-height: 1.55; }
  .sf-choices { background: #f8f9fc; }
  .sf-choices legend { font-size: .85rem; font-weight: 600; padding-inline: 6px; }
  .sf #review { padding: 28px; background: white; border: 1px solid var(--d-line); border-radius: 14px; }
  .sf #review > h2 { margin: 0 0 12px; font-size: 1.6rem; }
  .sf-record { background: #fafbfd; padding: 24px; }
  .sf-record h2 { font-size: 1.7rem; line-height: 1.2; }
  .sf-record h3 { font-size: 1.05rem; line-height: 1.4; margin-top: 24px; }
  .sf-clear { border-top: 1px solid var(--d-line); padding: 20px 0; }
  .sf-clear p { font-size: .78rem; }
  .sf-sources { margin-top: 32px; padding-top: 24px; }
  .sf-sources h2 { font-size: 1.2rem; }
  .sf-sources p, .sf-sources li { font-size: .8rem; }
  @media (max-width: 760px) {
    .sf-notices, .sf-workspace { grid-template-columns: 1fr; gap: 0; }
    .sf-privacy, .sf-danger { margin: 8px 0; padding: 14px 16px; }
    .sf-sections { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 12px 0 18px; margin-bottom: 8px; }
    .sf-sections a { flex: 0 0 auto; background: white; border: 1px solid var(--d-line); padding: 10px 12px; font-size: .78rem; }
    #concern-form section, .sf #review { padding: 20px; }
    .sf-grid { grid-template-columns: 1fr; }
    .sf-record { padding: 18px; }
    .sf-nav { padding-inline: 20px; gap: 12px; }
  }
}
@media print {
  body.sf-print-ready .sf-workspace, body.sf-print-ready .sf-main { display: block !important; }
  .sf-record h3 { line-height: 1.4; }
}

/* Safeguarding introduction: readable context, separate from the recording workspace. */
@media screen {
  .sf-safeguarding .sf-intro { padding-bottom: 20px; max-width: 900px; }
  .sf-safeguarding .sf-intro > p:last-child { max-width: 64ch; font-size: 1.08rem; line-height: 1.65; }
  .sf-safeguarding .sf-context { margin: 4px 0 32px; }
  .sf-context .sf-notices { gap: 32px; padding: 24px 0; border-block: 1px solid var(--d-line); }
  .sf-context :is(.sf-privacy, .sf-danger) { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .sf-context .sf-danger { padding-left: 32px; border-left: 1px solid var(--d-line); }
  .sf-context :is(.sf-privacy, .sf-danger) h2 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
  .sf-context :is(.sf-privacy, .sf-danger) p { font-size: .89rem; line-height: 1.65; }
  .sf-context .sf-danger strong { color: var(--d-pink); font-weight: 650; }
  .sf-context .sf-guidance { margin: 16px 0 0; background: white; border: 1px solid var(--d-line); border-radius: 14px; overflow: hidden; }
  .sf-context .sf-guidance summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
  .sf-context .sf-guidance summary::-webkit-details-marker { display: none; }
  .sf-context .sf-guidance summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--d-slate); border-bottom: 2px solid var(--d-slate); transform: rotate(45deg); flex-shrink: 0; margin-right: 4px; }
  .sf-context .sf-guidance[open] summary::after { transform: rotate(225deg); }
  .sf-context .sf-guidance summary:hover { background: #fafbfd; }
  .sf-context .sf-guidance summary:focus-visible { outline: 3px solid var(--d-pink); outline-offset: -3px; border-radius: 12px; }
  .sf-guidance-title { display: block; font-size: .96rem; line-height: 1.4; }
  .sf-guidance-caption { display: block; font-size: .8rem; font-weight: 400; color: var(--d-slate); margin-top: 5px; }
  .sf-guidance-body { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; padding: 0 24px 24px; }
  .sf-context .sf-guidance-body p { margin: 0; padding-top: 20px; border-top: 1px solid var(--d-line); font-size: .88rem; line-height: 1.7; }
  @media (max-width: 760px) {
    .sf-context .sf-notices { gap: 20px; padding: 20px 0; }
    .sf-context .sf-danger { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--d-line); }
    .sf-context .sf-guidance summary { padding: 18px; }
    .sf-guidance-body { grid-template-columns: 1fr; gap: 16px; padding: 0 18px 20px; }
    .sf-context .sf-guidance-body p + p { padding-top: 0; border-top: 0; }
  }
}
