/* Shared reading and navigation surfaces. Charts keep their own scales and print layout. */
@media screen {
  :root {
    --screen-label-min: 1rem;
    --screen-body-min: 1.0625rem;
  }
  body[data-design=apple] {
    --studio-gutter: clamp(20px, 4vw, 64px);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    word-break: keep-all;
    overflow-wrap: break-word;
  }
  html:not([data-theme=dark]) body[data-design=apple] {
    --canvas: #f7f8f7;
    --paper: #ffffff;
    --ink: #132420;
    --body: #34433e;
    --muted: #53635d;
    --line: #dce3df;
    --mint-soft: #e8f4ef;
    --accent: #006a53;
  }
  .header .nav-category > button {
    font-size: 1rem;
    letter-spacing: -.025em;
    font-weight: 640;
  }
  .header .nav-category:has(a[aria-current="page"]) > button {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: .42em;
  }
  body .header {
    padding-inline: max(var(--studio-gutter, 24px), calc((100vw - 1320px) / 2));
    height: 68px;
  }
  body .header .brand {
    font-size: 1.45rem;
    letter-spacing: -.065em;
  }
  body .header .category-panel {
    background: var(--paper);
    color: var(--ink);
    padding-inline: max(var(--studio-gutter, 24px), calc((100vw - 1240px) / 2));
    padding-block: 26px 34px;
    column-gap: clamp(22px,5vw,76px);
    align-items: start;
  }
  body .header .category-panel p {
    color: var(--muted);
    font-size: .9375rem;
    letter-spacing: 0;
    font-weight: 600;
  }
  body .header .category-panel a {
    min-height: 44px;
    font-size: 1rem;
    line-height: 1.4;
  }
  body .header .category-panel .category-feature a {
    font-size: clamp(1.375rem, 2.2vw, 2rem);
    font-weight: 680;
    line-height: 1.3;
    letter-spacing: -.045em;
    margin-block: 1px 8px;
  }
  body .header .category-panel a:is(:hover,:focus-visible) {
    transform: none;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: .32em;
  }
  body .header .library-link {
    white-space: nowrap;
    font-weight: 620;
    color: var(--ink);
    background: var(--mint-soft);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-inline: 19px;
  }
  body .footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 32px max(var(--studio-gutter,24px),calc((100vw - 1240px) / 2));
    gap: 20px;
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .footer .footer-links {display: flex; flex-wrap: wrap; gap: 8px 22px;}
  .footer .footer-links a {display: inline-flex; align-items: center; min-height: 42px; font-size: .9375rem;}
  main .page-heading h1 {text-wrap: balance; letter-spacing: -.055em;}
  main .page-heading .lead {line-height: 1.65; max-width: 44em;}
  main :is(.caption,.meta,.field-help,figcaption) {line-height: 1.55;}
  main :is(input,textarea,select) {scroll-margin-top: 92px;}
  body .studio-account-entrance {max-width: 1350px; margin: auto; padding: clamp(38px,7vw,96px) var(--studio-gutter);}
  .studio-account-entrance section {
    display: grid; grid-template-columns: 1fr 1fr; align-items: center;
    overflow: hidden; border-radius: clamp(18px,2.5vw,36px); background: var(--paper);
    border: 1px solid var(--line); min-height: min(400px, 42vw);
  }
  .studio-account-entrance section > div {padding: clamp(24px,4vw,62px);}
  .studio-account-entrance h1 {font-size: clamp(2.4rem, 4.8vw, 4rem); line-height: 1.09; letter-spacing: -.06em;}
  .studio-account-entrance p {margin: 18px 0 26px; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; max-width: 29em; color: var(--body);}
  .studio-library-sheets {
    position: relative; isolation: isolate; align-self: stretch; overflow: hidden;
    background: var(--mint-soft); min-height: 210px;
  }
  .studio-library-sheets i {
    position: absolute; left: 28%; top: 13%; width: 43%; height: 77%;
    border-radius: 6px 17px 17px 6px; border: 2px solid #608b7d;
    background: #f4faf7; transform-origin: 15% 80%;
  }
  .studio-library-sheets i:first-child {transform: rotate(-15deg); background: #a4c6ba;}
  .studio-library-sheets i:nth-child(2) {transform: rotate(-5deg); background: #c9ded4;}
  .studio-library-sheets i:last-child {transform: rotate(6deg);}
  .studio-library-sheets i:last-child::before {
    content: ""; position: absolute; left: 14%; top: 22%; width: 52%;
    height: 19%; border-block: 2px solid #83a79a;
  }
  .studio-account-entrance .actions {flex-wrap: wrap; margin: 0; gap: 10px 18px; align-items: center;}
  @media (max-width: 980px) and (min-width: 761px) {
    body .header:has(.header-account) {padding-inline: 20px; column-gap: 12px;}
    .header .category-navigation {gap: 16px;}
  }
  @media (max-width: 760px) {
    .studio-account-entrance section {grid-template-columns: 1fr;}
    .studio-library-sheets {min-height: 130px; aspect-ratio: 2.5;}
    body .header:has(.header-account) {height: 62px; padding-inline: 18px; column-gap: 12px;}
    body .header :is(.appearance-toggle,.mobile-menu) {width:44px;height:44px;flex:0 0 44px;}
    body .header .category-panel {padding: 16px 0; gap: 15px 22px;}
    body .header .category-panel .category-feature {display: flex; flex-wrap: wrap; gap: 8px 24px;}
    body .header .category-panel .category-feature a {font-size: 1.25rem;}
    body .footer {align-items: flex-start; flex-direction: column; row-gap: 12px;}
  }
  @media (max-width: 360px) {
    body .header:has(.header-account) {padding-inline:8px;column-gap:6px;}
    body .header .brand {flex-shrink:0;}
  }
  @media (prefers-reduced-motion: reduce) {
    #toast {transition:none;}
    .header .category-panel, .header .category-panel a {transition: none;}
  }
}
