/* Framebudget editorial finish. Palette is inherited from styles.css. */
body[data-experience='simple'] .advanced-only,
body[data-experience='advanced'] .simple-only { display: none !important; }
body[data-experience='simple'] #capacity-guide,
body[data-experience='simple'] .under-calculator > span:last-child { display: none; }
.experience-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.experience-switch button { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--muted); padding: 12px 14px; text-align: left; font-size: 15px; font-weight: 600; min-height: 66px; transition: border-color 150ms, background 150ms; }
.experience-switch button small { display: block; font-size: 11px; margin-top: 4px; font-weight: 400; }
.experience-switch button[aria-pressed='true'] { border-color: var(--fg); background: var(--fg); color: var(--surface); }
.experience-switch button:hover { border-color: var(--fg); }
.simple-intro { margin-block: 4px 24px; }
.simple-intro h2 { font-size: 34px; letter-spacing: -1px; }
.simple-intro p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
body[data-experience='simple'] .field { margin-bottom: 20px; }
body[data-experience='simple'] .field .input { min-height: 50px; }
body[data-experience='simple'] .result-stats { grid-template-columns: 1fr 1fr; }
.simple-assumptions { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 16px; }
.simple-assumptions p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0; }
.simple-assumptions button { min-height: 44px; padding: 8px 0; background: transparent; border: 0; font-size: 12px; color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.custom-settings-note { border-left: 2px solid var(--accent); padding-left: 12px; font-size: 12px; line-height: 1.6; }
.phone-storage .sd-card { border: 2px solid color-mix(in oklch, var(--surface) 40%, var(--fg)); border-radius: 18px; background: color-mix(in oklch, var(--surface) 7%, var(--fg)); padding-top: 40px; }
.phone-storage .sd-card::before { clip-path: none; background: var(--fg); border-radius: 6px; width: 38px; height: 7px; top: 10px; left: calc(50% - 19px); z-index: 1; }
.phone-storage .sd-card::after, .phone-storage .sd-contacts { display: none; }
.phone-storage #sd-size { font-size: 27px; letter-spacing: -1px; }
.phone-storage .sd-bottom { font-size: 5px; }
@media(max-width:540px) {
  .experience-switch { gap: 6px; margin-bottom: 22px; }
  .experience-switch button { padding-inline: 12px; }
  .experience-switch button small { font-size: 10px; }
  .simple-intro h2 { font-size: 30px; }
  .simple-intro { margin-bottom: 22px; }
  .simple-assumptions p { font-size: 12px; }
  .phone-storage #sd-size { font-size: 22px; }
}
.topnav { background: var(--bg); }
.topnav-inner { height: 80px; }
.hero { position: relative; }
.hero .eyebrow { display: flex; align-items: center; gap: 5px; }
.rec-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(50px, 5.5vw, 78px); }
.hero h1 em { position: relative; }
.hero-aside { max-width: 345px; }
.text-link { display: inline-flex; min-height: 40px; align-items: center; }
.text-link span { transition: transform 150ms ease; }
.text-link:hover span { transform: translate(-2px, 2px); }
.topnav nav a { min-height: 44px; display: inline-flex; align-items: center; }
.calculator-shell { background: var(--surface); border-radius: 12px; box-shadow: 0 18px 48px -30px color-mix(in oklch, var(--fg) 30%, transparent); }
.settings { padding: 22px 32px 14px; min-height: 0; }
.panel-heading { margin-bottom: 16px; }
.reset { min-height: 44px; padding-inline: 8px; }
.mode-switch { position: relative; isolation: isolate; margin-bottom: 20px; }
.mode-switch::before { content: ''; position: absolute; z-index: -1; width: calc(50% - 4px); top: 4px; bottom: 4px; left: 4px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); box-shadow: 0 1px 3px var(--fg-soft); transition: transform 200ms cubic-bezier(.2,0,0,1); }
.mode-switch[data-active='card']::before { transform: translateX(100%); }
.mode-switch button { min-height: 44px; }
.mode-switch button.active { background: transparent; border-color: transparent; box-shadow: none; }
.field { margin-bottom: 14px; }
.field label, legend { font-size: 13px; }
.field label { display: flex; align-items: center; }
.input { min-height: 46px; }
.unit-input input { min-height: 44px; }
.input, .unit-input { transition: border-color 150ms, box-shadow 150ms; }
.input:hover, .unit-input:hover { border-color: color-mix(in oklch, var(--fg) 50%, var(--border)); }
.input:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.help-link { width: 36px; height: 36px; border: 0; margin: -6px 0 -6px 4px; font-family: var(--font-mono); font-size: 12px; background: radial-gradient(circle at center, var(--fg-soft) 9px, transparent 10px); }
.hint { font-size: 12px; }
.capacity-field { margin-block: 16px; }
.capacity-options span { min-height: 58px; pointer-events: none; transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; }
.capacity-options input:checked + span { box-shadow: inset 0 -3px var(--accent); }
.capacity-options label:hover span { transform: translateY(-2px); }
.capacity-options input:active + span { transform: translateY(0) scale(.97); }
.capacity-options small { font-size: 10px; }
.margin-row label { font-size: 13px; }
.margin-row small { font-size: 12px; }
.margin-row select { min-height: 44px; }
.result-panel { position: relative; background: var(--fg); padding: 34px 36px 26px; overflow: hidden; }
.result-panel::before { content: ''; position: absolute; pointer-events: none; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--surface) 35%, transparent), transparent); }
.result-panel:focus { outline-offset: -5px; }
.result-tag { font-size: 10px; color: color-mix(in oklch, var(--surface) 72%, transparent); }
.result-panel .eyebrow { font-size: 11px; }
.result-number { margin-top: 13px; font-variant-numeric: lining-nums tabular-nums; font-size: clamp(64px, 6.5vw, 90px); }
#main-number { display: inline-block; }
.long-result .result-number { font-size: clamp(40px, 4.5vw, 64px); }
.result-subtitle { font-size: 13px; max-width: 44ch; }
.storage-visual { min-height: 234px; padding: 30px 0; gap: 36px; position: relative; }
.sd-card { width: 139px; height: 177px; border: 0; border-radius: 0; background: none; box-shadow: none; isolation: isolate; padding: 18px 16px; transform: rotate(-8deg); filter: drop-shadow(5px 10px 8px color-mix(in oklch, var(--fg) 70%, transparent)); }
.sd-card::before, .sd-card::after { content: ''; position: absolute; inset: 0; z-index: -1; clip-path: polygon(20% 0,96% 0,100% 4%,100% 96%,96% 100%,4% 100%,0 96%,0 19%); }
.sd-card::before { background: linear-gradient(140deg, color-mix(in oklch, var(--surface) 52%, var(--fg)), color-mix(in oklch, var(--surface) 15%, var(--fg)) 48%, color-mix(in oklch, var(--surface) 36%, var(--fg))); }
.sd-card::after { inset: 1px; background: linear-gradient(135deg, color-mix(in oklch, var(--surface) 18%, var(--fg)), color-mix(in oklch, var(--surface) 6%, var(--fg)) 65%); }
.sd-contacts { margin-left: 13px; gap: 4px; margin-bottom: 19px; }
.sd-contacts i { height: 25px; width: 11px; background: linear-gradient(90deg, color-mix(in oklch, var(--accent) 35%, var(--muted)), color-mix(in oklch, var(--accent) 50%, var(--surface)), color-mix(in oklch, var(--accent) 35%, var(--muted))); border-bottom: 2px solid color-mix(in oklch, var(--accent) 40%, var(--fg)); }
.sd-brand { font-size: 8px; letter-spacing: 1px; opacity: .85; }
#sd-size { font-size: 43px; line-height: 1.3; }
.sd-unit { font-size: 12px; }
.sd-bottom { letter-spacing: .7px; font-size: 6px; margin-top: 7px; padding-top: 9px; }
.storage-visual::before { content: ''; position: absolute; width: 139px; height: 177px; left: 0; background: color-mix(in oklch, var(--surface) 10%, var(--fg)); border: 1px solid color-mix(in oklch, var(--surface) 20%, var(--fg)); clip-path: polygon(20% 0,96% 0,100% 4%,100% 96%,96% 100%,4% 100%,0 96%,0 19%); transform: rotate(5deg) translate(9px,4px); opacity: 0; transition: opacity 180ms, transform 180ms; }
.storage-visual.multiple-cards::before { opacity: 1; }
.visual-caption { max-width: none; }
.visual-caption .meta { font-size: 10px; letter-spacing: 1px; }
.visual-caption strong { font-size: 26px; margin-block: 10px; }
#card-context { font-size: 12px; }
.capacity-meter { height: 6px; margin-top: 17px; }
.capacity-meter span { background: var(--accent); transition: width 220ms cubic-bezier(.2,0,0,1); }
#capacity-note { font-size: 10px; line-height: 1.5; display: block; }
.result-stats { gap: 16px; padding-block: 20px; }
.result-stats span { font-size: 11px; line-height: 1.5; }
.result-stats strong { font-size: 18px; }
.result-bottom { padding-top: 18px; align-items: center; }
.result-bottom p { font-size: 11px; line-height: 1.6; max-width: 25ch; }
.share-button { font-size: 12px; min-height: 44px; }
.under-calculator { font-size: 11px; }
.notes-grid .formula { line-height: 1.7; }
.faq-list summary { min-height: 54px; }
.faq-list summary:hover { color: var(--fg); background: var(--fg-soft); }
.faq-list details[open] summary { font-weight: 600; }
.closing .btn-primary { background: var(--fg); border-color: var(--fg); }
.closing .btn-primary:hover { background: var(--muted); }
.mobile-plan { display: none; }
@media (max-width: 1100px) and (min-width: 921px) {
  .settings { padding-inline: 24px; }
  .result-panel { padding-inline: 26px; }
  .storage-visual { gap: 25px; }
  .visual-caption strong { font-size: 22px; }
  .visual-caption .meta { font-size: 9px; }
  .result-bottom { align-items: flex-start; }
}
@media (max-width: 920px) {
  html { scroll-padding-bottom: 100px; }
  .hero-aside { max-width: none; }
  .result-panel { padding: 32px; }
  .storage-visual { justify-content: flex-start; gap: 48px; }
  .visual-caption { max-width: 320px; }
  .result-number { font-size: 86px; }
  .result-bottom { flex-direction: row; }
  .mobile-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: fixed; z-index: 20; bottom: max(12px, env(safe-area-inset-bottom)); left: 16px; right: 16px; max-width: 560px; margin-inline: auto; padding: 12px 16px; background: var(--fg); color: var(--surface); border: 1px solid color-mix(in oklch, var(--surface) 25%, var(--fg)); border-radius: 8px; box-shadow: 0 8px 30px color-mix(in oklch, var(--fg) 25%, transparent); }
  .mobile-plan-label { display: block; font-family: var(--font-mono); color: color-mix(in oklch, var(--surface) 65%, var(--fg)); font-size: 9px; letter-spacing: 1px; margin-bottom: 4px; }
  #mobile-estimate { font-size: 16px; font-family: var(--font-mono); font-weight: 400; }
  #mobile-estimate span { font-size: 11px; }
  #view-plan { display: flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 8px; font-size: 12px; white-space: nowrap; }
  .mobile-plan :focus-visible { outline-color: var(--surface); }
  .mobile-plan-blocked { visibility: hidden; }
  .field input, .field select, .margin-row select { font-size: 16px; }
  .help-link { width: 44px; height: 44px; margin-block: -10px; }
  .under-calculator { font-size: 12px; }
  .notes-grid p { font-size: 14px; }
  .notes-grid { gap: 26px; }
}
@media (max-width: 540px) {
  .topnav-inner { height: 68px; }
  .hero h1 { font-size: clamp(43px,11.9vw,58px); letter-spacing: -2px; }
  .section.hero { padding-block: 30px 28px; }
  .hero-layout { gap: 20px; }
  .hero .lead { margin-bottom: 6px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 1.2px; margin-bottom: 18px; }
  .settings { padding: 16px 18px 12px; }
  .panel-heading { margin-bottom: 12px; }
  .mode-switch { margin-bottom: 18px; }
  .bitrate-field { grid-template-columns: 1fr 140px; }
  .capacity-options { gap: 6px; }
  .margin-row { gap: 10px; }
  .margin-row label { font-size: 12px; }
  .margin-row small { font-size: 11px; }
  .margin-row select { padding-inline: 6px; }
  .result-panel { padding: 28px 20px 20px; }
  .result-number { font-size: clamp(56px,18vw,78px); letter-spacing: -3px; }
  .result-subtitle { font-size: 12px; }
  .storage-visual { gap: 27px; min-height: 224px; padding-block: 32px; }
  .sd-card, .storage-visual::before { width: 110px; height: 147px; }
  .sd-card { padding: 15px 12px; }
  .sd-contacts { margin-left: 10px; gap: 3px; margin-bottom: 14px; }
  .sd-contacts i { width: 9px; height: 20px; }
  .sd-brand { font-size: 6px; }
  #sd-size { font-size: 34px; }
  .sd-unit { font-size: 10px; }
  .sd-bottom { font-size: 5px; padding-top: 6px; }
  .visual-caption .meta { font-size: 9px; line-height: 1.6; }
  .visual-caption strong { font-size: 21px; }
  #card-context { font-size: 12px; }
  #capacity-note { font-size: 11px; }
  .result-stats { gap: 10px; }
  .result-stats span { font-size: 12px; min-height: 36px; }
  .result-stats strong { font-size: 15px; }
  .result-bottom p { font-size: 12px; }
  .share-button { font-size: 12px; }
  .under-calculator { font-size: 11px; }
  .section { padding-block: 36px; }
  .notes-heading { margin-bottom: 26px; }
  .notes-grid h3 { margin-top: 12px; }
  .notes-grid .card-rule { padding-top: 18px; }
  .faq-list details p { font-size: 14px; }
  .faq-list summary { font-size: 14px; }
  .closing { display: none; }
  .pagefoot a { min-height: 44px; display: inline-flex; align-items: center; }
  .pagefoot .row-between { gap: 4px; }
  #mobile-estimate { font-size: 15px; }
  .mobile-plan { left: 12px; right: 12px; padding-inline: 12px; gap: 4px; }
}
@media (pointer: coarse) {
  .field input, .field select, .margin-row select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .capacity-options label:hover span, .capacity-options input:active + span { transform: none; }
}

/* Search-friendly guidance and an unobtrusive, keyboard-accessible choice. */
.storage-examples h3 { margin-top: 28px; font-size: 20px; }
.storage-examples p { line-height: 1.7; }
.storage-examples caption { text-align: left; margin-bottom: 15px; font-size: 13px; }
.analytics-consent { position: fixed; z-index: 100; inset: auto 20px 20px; max-width: 760px; margin-inline: auto; background: #fffdf6; color: #191919; padding: 22px; border: 1px solid #b7b5a9; border-radius: 16px; box-shadow: 0 8px 40px #0003; }
.analytics-consent[hidden] { display: none; }
.analytics-consent p { font-size: 13px; line-height: 1.55; margin: 7px 0 16px; }
.analytics-consent a { text-decoration: underline; }
.consent-actions { display: flex; gap: 12px; }
.consent-actions button { flex: 1; min-height: 44px; border: 1px solid #191919; background: transparent; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; }
.consent-actions button:last-child { background: #e9f285; }
body:has(#analytics-consent:not([hidden])) #mobile-plan { display: none; }
#analytics-settings { border: 0; background: transparent; cursor: pointer; font: inherit; text-decoration: underline; }
@media(max-width:540px) { .analytics-consent { inset: auto 12px 12px; padding: 16px; } }

.clip-helper { border-block: 1px solid var(--border); padding-block: 16px; margin-bottom: 24px; }
.video-settings { border: 1px solid var(--border); min-width: 0; padding: 20px; margin: 0 0 20px; border-radius: 12px; background: #ffffff30; }
.video-settings legend { padding-inline: 8px; font-size: 17px; font-weight: 600; }
.video-intro { margin: 0 0 22px; }
.video-grid { gap: 14px; }
.video-grid > .field { min-width: 0; }
.video-grid .input { width: 100%; min-width: 0; text-overflow: ellipsis; }
.video-setting-status { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); line-height: 1.65; }
.video-setting-status[data-error="true"] { color: #a52820; }
.quick-profiles { margin-bottom: 22px; }
.quick-profiles summary { cursor: pointer; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.quick-profiles summary::before { content: '+'; margin-right: 10px; }
.quick-profiles[open] summary::before { content: '−'; }
.quick-profiles .field { margin-top: 12px; }
#mbps[readonly] { opacity: .72; }
@media(max-width:540px) { .video-settings { padding: 16px; } .video-grid { grid-template-columns: 1fr; gap: 0; } }
.clip-helper summary { cursor: pointer; font-size: 14px; line-height: 1.6; }
.clip-helper .btn { font-size: 12px; min-height: 44px; }
.production-settings { border-top: 1px solid var(--border); padding-top: 22px; }
.production-settings h3 { font-size: 17px; margin: 0 0 20px; }
#production-summary { margin-block: 20px; font-size: 12px; line-height: 1.7; }
.result-bottom { flex-wrap: wrap; }
#production-summary { flex-basis: 100%; }
#camera-help, #quality-help { line-height: 1.65; }
.result-stats strong { overflow-wrap: anywhere; }

.ad-slot { padding-block: 22px; border-block: 1px solid var(--border); }
.ad-slot > .meta { display: block; font-size: 10px; color: var(--muted); margin-bottom: 12px; }
.ad-frame { width: 100%; min-height: 100px; max-width: 970px; margin-inline: auto; }
@media(max-width:540px) { .ad-frame { min-height: 100px; } }

.estimate-method { margin-top: 12px; font-size: 12px; line-height: 1.6; }
.estimate-method summary { cursor: pointer; padding-block: 8px; }
