/* Screen-only envelope. No selectors target approved prose, figures or notation.
   Keep independent of book.css so this layer can be changed without reflowing content. */
@media screen {
  body { background:#fff8f3; }
  .topbar {
    background:#392c48; color:#fff9f5; border:0;
    box-shadow:0 3px 18px #392c4818;
    min-height:82px; padding:13px 22px; gap:20px;
    flex-wrap:nowrap;
  }
  .brand { min-width:205px; gap:10px; color:#fff9f5; }
  .brand small { color:#eadbdc; font-size:12px; }
  .brand-mark {
    width:42px; height:46px; border:0; border-radius:14px;
    background:#ffbe9e; color:#392c48; padding-top:3px;
  }
  .topbar nav { gap:6px; flex-wrap:nowrap; }
  .topbar nav a, .topbar nav a:last-child {
    display:inline-flex; align-items:center; gap:8px;
    padding:11px 13px; border:0; border-radius:11px;
    font-size:15px; font-weight:700; color:#fff3eb;
    background:#ffffff09;
    text-decoration:none; transition:background .15s,color .15s;
  }
  .topbar nav a:hover { background:#ffffff18; color:white; }
  .topbar nav a[aria-current] {
    background:#ffbe9e; color:#392c48; font-weight:700;
    box-shadow:0 2px 6px #20112b20;
  }
  .topbar nav .public-pdf { color:#f3d8ff; font-size:13px; }
  .shell-nav-icon { width:21px; height:21px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .shell-utilities { display:flex; align-items:center; gap:10px; padding-inline-start:16px; border-inline-start:1px solid #ffffff29; }
  .shell-more { position:relative; flex:none; }
  .shell-more>summary { display:flex; align-items:center; gap:7px; cursor:pointer; list-style:none; color:#e3d4e7; font-size:13px; padding:10px 3px; border-radius:7px; white-space:nowrap; }
  .shell-more>summary::-webkit-details-marker { display:none; }
  .shell-more>summary>svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
  .shell-more>summary:hover { color:white; }
  .shell-more-panel { position:absolute; top:calc(100% + 13px); left:0; width:245px; background:#fff; color:#5a3867; padding:8px; border:1px solid #ecd9ee; border-radius:14px; box-shadow:0 12px 35px #24112933; z-index:50; }
  .shell-more-panel a { display:flex; align-items:center; gap:12px; padding:12px; color:#654570; text-decoration:none; border-radius:8px; font-size:14px; white-space:nowrap; }
  .shell-more-panel a:hover { background:#fff0e5; color:#71482e; }
  .shell-more-panel a[aria-current] { background:#f4e9fa; font-weight:700; }
  .print-action {
    background:#ffffff12; color:#fff3eb; border:1px solid #ffffff3b;
    border-radius:9px; padding:8px 12px; gap:8px; font-size:13px;
  }
  .print-action:hover { background:#ffffff24; }
  .primary, .secondary {
    border-radius:12px; min-height:44px;
    transition:background .15s,box-shadow .15s;
  }
  .primary { color:#fff; background:#704782; border-color:#704782; }
  .primary:hover { background:#573565; box-shadow:0 3px 12px #70478220; }
  .secondary { background:white; color:#55355e; border-color:#ddcbdc; }
  .secondary:hover { background:#f8effb; border-color:#bfa4c5; }
  .hero { padding-block:48px 42px; }
  .hero h1 { color:#392c48; }
  .hero .eyebrow, .section-title small { color:#805266; }
  .hero .intro { color:#6b5465; }
  .hero .author { color:#65466b; }
  .pilot-tag { color:#785c6b; }
  .pilot-tag:before { background:#d67449; }
  .book-visual {
    background:linear-gradient(140deg,#ffe4d3,#fff1e7 55%,#f0e3f6);
    color:#53345d; border-radius:22px; box-shadow:0 14px 35px #70478212;
  }
  .book-visual:after { border-color:#b1849b55; }
  .book-visual .small-serif { color:#82566d; }
  .staff-art {
    background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 19px,#bca1b2 19px,#bca1b2 20px);
  }
  .staff-art span,.staff-art span:before { background:#885391; }
  .section-title { border-color:#ead9df; }
  .section-title h2 { color:#392c48; }
  .chapter-grid { gap:12px; border:0; }
  .chapter-card {
    background:#fff; border:1px solid #efdee3; border-radius:15px;
    box-shadow:0 3px 10px #392c4804; padding:22px;
  }
  .chapter-card:hover { background:#fff1e8; border-color:#ecc2aa; }
  .chapter-card .num {
    color:#a86441; background:#fff0e4; min-width:44px; height:44px;
    display:grid; place-items:center; border-radius:12px; font-size:23px;
  }
  .chapter-card h3 { color:#493650; }
  .chapter-card small { color:#826775; }
  .chapter-card .arrow { color:#86558d; }
  .companion { background:#f2e8f8; color:#593664; border-radius:16px; }
  .companion:last-child { background:#ffeadc; color:#764932; }
  .companion p { color:#725967; }
  .resume { color:#69456f; border-color:#d8bcd9; }
  .sidebar {
    background:#fff; color:#4e3859; border:1px solid #f0dfe9;
    border-radius:16px; padding-inline:10px;
    box-shadow:0 5px 20px #70478208;
  }
  .sidebar .eyebrow { color:#86598d; }
  .sidebar-heading { padding-inline:4px; }
  .sidebar-close { background:#faf3fc; border-color:#e2cfe8; color:#74427b; border-radius:9px; }
  .sidebar-close:hover { background:#f0e2f5; }
  .sidebar a { color:#60486b; border-radius:9px; }
  .sidebar a:hover { background:#faf0e9; }
  .sidebar a[aria-current] { color:#75452e; background:#ffe9d9; }
  .sidebar .side-num { color:#a17198; }
  .sidebar details[open]>summary { color:#784486; }
  .sidebar summary a { display:inline-flex; align-items:baseline; gap:6px; }
  .sidebar summary .side-num { flex:none; min-width:19px; }
  .sidebar .subtopics { border-color:#edcdb7; }
  .sidebar .subtopics a { font-size:13px; }
  .sidebar .side-books { border-color:#efdeea; }
  .sidebar-toggle {
    background:#704782; color:#fff9f5; border:0;
    border-radius:10px 0 0 10px; width:28px;
    box-shadow:-2px 2px 12px #70478220;
  }
  .sidebar-toggle:hover { background:#573565; }
  .reader-header { border-color:#eddae4; }
  .reader-header>.eyebrow { color:#88548e; }
  .reader-header>h1 { color:#473150; }
  .reader-header .toolbar { gap:8px; align-items:center; }
  .reader-header .toolbar button {
    background:#fff; color:#6a4374; border:1px solid #e4cfe5;
    border-radius:10px; padding:8px 14px; min-height:40px; font-size:14px;
  }
  .reader-header .toolbar button:first-child { background:#ffe9da; color:#73452f; border-color:#f0c7ac; }
  .reader-header .toolbar button:hover { background:#f5e8fa; }
  .reader-header .toolbar a { color:#765681; }
  .unit-bar { color:#876773; }
  .unit-bar .online-page { color:#795365; }
  .unit-bar button { color:#875c7c; text-decoration:none; border-radius:7px; padding:4px 8px; }
  .unit-bar button:hover { background:#f6e9f4; }
  .exercise-shell { border-color:#e6cfe7; border-radius:14px; }
  .exercise-shell>summary { background:#fff1e7; color:#68426f; border-radius:13px; }
  .exercise-shell[open]>summary { border-radius:13px 13px 0 0; }
  .exercise-shell .exercise-badge {
    background:#704782; color:white; padding:3px 10px; border-radius:20px;
  }
  .exercise-shell .exercise-info { color:#795c79; }
  .exercise-shell .frame-actions { border-color:#ead7ec; color:#6f4677; }
  .exercise-tools { background:white; border-color:#ddc4e3; box-shadow:0 4px 20px #70478222; }
  .exercise-tools button { color:#704782; }
  .exercise-tools button:hover { background:#f5e7fa; }
  .crosslinks { background:#f4e9fa; color:#54345f; border-radius:15px; }
  .crosslinks a { color:#794a87; }
  .chapter-pagination a { color:#795082; }
  .catalog-page>h1 { color:#493350; }
  .catalog-page>.lead { color:#7c586c; }
  .practice-group { background:white; border-color:#e8d4e9; border-radius:14px; }
  .practice-group>summary { color:#6e417b; }
  .practice-list button { background:#fff4ec; color:#724b58; border-color:#efd7c5; border-radius:10px; }
  .practice-list button:hover { background:#ffe6d5; }
  .intro-note { background:#fff0e4; color:#80563c; border-radius:12px; }
  .site-footer { border-color:#ead9e2; color:#8b657b; }
  .site-footer button { color:#80508e; }
  dialog { background:#fff; color:#4b3458; border-color:#ecd9ee; border-radius:20px; box-shadow:0 24px 90px #392c483b; }
  dialog::backdrop { background:#2f16366b; }
  dialog .eyebrow { color:#9c628c; }
  dialog select { border-color:#dcc4e2; border-radius:10px; }
  #print-profiles label { border-color:#e9d9ec; border-radius:10px; }
  #print-profiles label:has(input:checked) { background:#fff0e5; border-color:#eab58f; }
  dialog input[type=radio] { accent-color:#875194; }
  .print-summary { background:#f8eefb; border-radius:10px; }
  .topbar a:focus-visible,.topbar button:focus-visible { outline-color:#ffd4ae; }
}
@media screen and (max-width:1120px) {
  .topbar { gap:12px; padding:12px 16px; }
  .brand { min-width:185px; font-size:15px; }
  .topbar nav a,.topbar nav a:last-child { padding:9px 10px; font-size:14px; gap:6px; }
  .shell-utilities { gap:7px; padding-inline-start:10px; }
  .shell-more>summary { font-size:12px; }
}
@media screen and (min-width:761px) and (max-width:1020px) {
  .topbar { display:grid; grid-template-columns:190px minmax(0,1fr); gap:6px 15px; }
  .brand { grid-row:1 / 3; }
  .topbar nav { justify-content:flex-start; }
  .shell-utilities { grid-column:2; padding-inline-start:0; border:0; justify-content:flex-start; }
  .shell-more>summary { padding-block:3px; }
  .print-action { padding-block:4px; }
}
@media screen and (max-width:760px) {
  .topbar { flex-wrap:wrap; gap:10px; padding:10px 14px; }
  .brand { flex:1; min-width:0; }
  .topbar nav {
    flex-basis:100%; order:3; flex-wrap:nowrap; overflow-x:auto;
    gap:5px; padding-block:2px 5px; scrollbar-width:thin;
  }
  .topbar nav a,.topbar nav a:last-child { flex:none; font-size:13px; padding:8px 10px; }
  .print-action { min-height:40px; padding:7px 11px; }
  .shell-utilities { padding-inline-start:0; border:0; gap:7px; }
  .shell-more>summary { font-size:12px; }
  .shell-nav-icon { width:18px; height:18px; }
  .shell-more-label { font-size:0; }
  .shell-more-label:after { content:'כלים'; font-size:12px; }
  .topbar nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; overflow:visible; }
  .topbar nav a,.topbar nav a:last-child { flex-direction:column; gap:4px; padding:7px 4px; font-size:12px; white-space:normal; text-align:center; justify-content:center; }
  .hero { padding-block:30px; }
  .chapter-card { padding:18px; }
  .sidebar-toggle { width:25px; }
  .reader-header .toolbar button { padding:7px 11px; font-size:13px; }
}
