.projects-module,
.project-dossier,
.projects-module section { min-width: 0; }
.project-gallery-intro { padding-block: .75rem .25rem; }
.project-gallery-intro h1 { max-width: 28ch; }
.project-gallery-intro p { max-width: 65ch; color: var(--muted); margin-block: .8rem .5rem; }
.project-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.project-card {
  min-width: 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.project-card:hover,
.project-card:focus-within { border-color: var(--accent); transform: translateY(-3px); }
.project-card-link { display: flex; flex-direction: column; height: 100%; border-radius: inherit; color: var(--text); }
.project-card-link:hover { text-decoration: none; }
.project-card-image { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: calc(var(--radius-card) - 1px) calc(var(--radius-card) - 1px) 0 0; background: var(--panel-2); }
.project-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem; }
.project-card-body h2 { font-size: 1.2rem; line-height: 1.35; overflow-wrap: anywhere; }
.project-card-description { color: var(--muted); font-size: .95rem; margin-block: .65rem 1.25rem; }
.project-card-action { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-block-start: auto; color: var(--accent-strong); font-size: .9rem; font-weight: 700; }
html[data-theme="dark"] .project-card-action { color: var(--text); }
html[dir="rtl"] .project-card-action > span,
html[dir="rtl"] .project-gallery-catalog a > span,
html[dir="rtl"] .project-selector-home > span { display: inline-block; transform: scaleX(-1); }
.project-card-link:hover .project-card-action,
.project-card-link:focus-visible .project-card-action { text-decoration: underline; text-underline-offset: .2em; }
.project-gallery-catalog { margin-block: .5rem 0; }
.projects-gallery [id],
.project-variant[id] { scroll-margin-top: 6rem; }
@media (min-width: 681px) and (max-width: 1000px) {
  .project-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .project-card { transition: none; }
  .project-card:hover,
  .project-card:focus-within { transform: none; }
}
.project-intro h1 { max-width: 30ch; }
.project-print-actions { margin-block: 1.2rem; }
.project-contents ul,
.project-downloads { display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; padding-inline-start: 1.25rem; }
.project-contents a { text-decoration: underline; text-underline-offset: .2em; }
.project-club-header { display: flex; align-items: center; gap: 1rem; padding-block-end: 1.25rem; margin-block-end: 1.25rem; border-bottom: 2px solid var(--accent); }
.project-club-header img { width: 90px; height: 90px; object-fit: contain; flex: 0 0 auto; }
.project-club-header address { font-style: normal; }
.project-club-header p { margin: .3rem 0 0; font-size: .85rem; }
.project-dossier > section { margin-block-start: 2rem; scroll-margin-top: 6rem; }
.project-dossier h3 { margin-block-end: .85rem; font-size: 1.3rem; }
.project-notice { border-inline-start: 4px solid var(--accent); padding: 1rem; background: var(--panel-2); }
.project-disclaimer { scroll-margin-top: 6rem; }
.project-disclaimer h2,
.project-disclaimer h3 { margin-block: 0 .75rem; font-size: 1.15rem; }
.project-disclaimer p { margin-block: .65rem 0; }
.project-variant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-variant { background: var(--panel-3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.project-variant h4 { font-size: 1.2rem; }
.project-variant dl { margin: 0; }
.project-variant dt { color: var(--muted); font-size: .85rem; }
.project-variant dd { margin-inline: 0; margin-block-end: .6rem; font-weight: 700; }
.projects-module .table-wrap { overflow-x: auto; }
.projects-module table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.projects-module caption { text-align: start; font-weight: 700; margin-block-end: .5rem; }
.projects-module th,
.projects-module td { padding: .65rem; text-align: start; border: 1px solid var(--border); vertical-align: top; }
.projects-module thead { background: var(--panel-2); }
.project-formula { padding: .85rem; background: var(--panel-3); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.project-diagram { margin: 1rem 0; }
.project-diagram img { display: block; width: 100%; height: auto; background: white; border-radius: 10px; }
.project-diagram figcaption { margin-block-start: .5rem; font-size: .85rem; color: var(--muted); }
.project-dossier li { margin-block-end: .65rem; }
.project-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-downloads a { overflow-wrap: anywhere; }
.project-measurements dt { font-weight: 700; }
.project-measurements dd { margin-inline: 0; margin-block: .5rem 1.4rem; overflow: hidden; }
.project-sources a { overflow-wrap: anywhere; }
.project-variant-detail { border-block-start: 2px solid var(--border); padding-block-start: 1.5rem; margin-block-start: 2rem; scroll-margin-top: 6rem; }
.project-variant-detail h4 { font-size: 1.2rem; }
.project-variant-detail h5 { margin-block: 1.2rem .65rem; font-size: 1rem; }
.project-variant-reference { overflow-wrap: anywhere; color: var(--muted); font-size: .85rem; }
.project-variant-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.project-variant-specs > div { padding: .7rem; border: 1px solid var(--border); border-radius: 8px; }
.project-variant-specs dt { font-size: .85rem; }
.project-variant-specs dd { font-weight: 700; margin: .3rem 0 0; }
.project-module-constraints { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; gap: .35rem 1rem; }
.project-module-constraints dd { margin: 0; }
.project-qualification { padding: .75rem; border-inline-start: 3px solid var(--accent); background: var(--panel-3); }
.project-variant-diagram img { max-height: 650px; object-fit: contain; }
.project-variant-club { display: none; }
.project-selector { display: flex; flex-wrap: wrap; gap: .75rem; }
.project-selector [aria-current="page"] { border: 2px solid var(--accent); font-weight: 750; }
.radio-kits-module { min-width: 0; }
.radio-kit-revision { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.radio-kit-release-links { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.radio-kit-picker > .radio-kit-all { display: inline-block; margin-block-end: 1rem; font-weight: 700; }
.radio-kit-picker [aria-current="page"] { outline: 2px solid var(--accent); outline-offset: 4px; }
.radio-kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.radio-kit-choice { display: flex; flex-direction: column; gap: .55rem; padding: .8rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.radio-kit-choice:hover,
.radio-kit-choice:focus-visible { border-color: var(--accent); background: var(--panel-2); }
.radio-kit-choice img { display: block; width: 100%; height: auto; aspect-ratio: 42 / 25; object-fit: contain; border-radius: 6px; background: #fff; }
.radio-kit-choice > span:last-child { font-size: .85rem; line-height: 1.5; }
.radio-kit-project { border-block-start: 2px solid var(--accent); margin-block-start: 2.5rem; padding-block-start: 1.5rem; scroll-margin-top: 6rem; min-width: 0; }
.radio-kit-project > h3 { font-size: 1.7rem; margin-block: .4rem .8rem; }
.radio-kit-status { color: var(--muted); font-size: .9rem; }
.radio-kit-purpose { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 1.5rem; margin-block: 1.5rem; }
.radio-kit-purpose h4 { margin-block: 0 .5rem; }
.radio-kit-purpose p { margin-block: 0; }
.radio-kit-cover img { max-height: 340px; object-fit: contain; }
.radio-kit-project .project-tech > section,
.radio-kit-files { margin-block-start: 2rem; }
.radio-kit-project h4 { font-size: 1.2rem; }
.radio-kit-project h5 { font-size: 1rem; margin-block: 1.4rem .7rem; }
.radio-kit-project .project-tech { line-height: 1.65; }
.radio-kit-project .project-tech p { max-width: 90ch; }
.radio-kit-project table { line-height: 1.5; }
.radio-kit-specifications th { width: 26%; }
.radio-kit-bom { min-width: 640px; }
.radio-kit-bom th:first-child { width: 16%; }
.radio-kit-bom th:nth-child(2) { width: 6%; }
.radio-kit-project .table-wrap { max-width: 100%; }
.radio-kit-sheet img { border: 1px solid var(--border); border-radius: 0; }
.radio-kit-reading { margin-block: 1.5rem 2.5rem; }
.radio-kit-reading figcaption { margin-block: 0 .75rem; color: var(--text); font-size: 1.05rem; }
.radio-kit-reading-viewport { overflow-x: auto; direction: ltr; border: 1px solid var(--border); border-radius: 10px; background: white; }
.radio-kit-reading-viewport img { width: 100%; min-width: 720px; border-radius: 0; }
.schematic-viewer { width: 96vw; max-width: 1600px; max-height: 94vh; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); }
.schematic-viewer::backdrop { background: rgb(0 0 0 / .7); }
.schematic-viewer-toolbar { padding: 1rem; border-block-end: 1px solid var(--border); }
.schematic-viewer-toolbar h2 { font-size: 1.1rem; margin-block-end: .75rem; }
.schematic-viewer-controls { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.schematic-viewer-controls output { min-width: 4rem; text-align: center; }
.schematic-viewer-canvas { overflow: auto; direction: ltr; height: min(72vh, 1000px); padding: 1rem; background: #fff; }
.schematic-viewer-canvas img { display: block; max-width: none; height: auto; }
.radio-kit-mechanics { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.radio-kit-mechanics h4,
.radio-kit-mechanics > figure:last-child { grid-column: 1 / -1; }
.radio-kit-inventory summary { cursor: pointer; font-size: 1.1rem; font-weight: 700; }
.radio-kit-inventory[open] summary { margin-block-end: 1rem; }
@media (max-width: 1000px) {
  .radio-kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .radio-kit-cards,
  .radio-kit-purpose,
  .radio-kit-mechanics { grid-template-columns: 1fr; }
  .radio-kit-purpose { gap: 1rem; }
  .radio-kit-choice { display: grid; grid-template-columns: 90px 1fr; gap: .4rem .8rem; }
  .radio-kit-choice img { grid-row: span 3; align-self: center; }
  .radio-kit-mechanics h4,
  .radio-kit-mechanics > figure:last-child { grid-column: auto; }
  .project-card-grid { grid-template-columns: 1fr; gap: 1.15rem; }
  .project-variant-grid,
  .project-downloads { grid-template-columns: 1fr; }
  .project-club-header { align-items: flex-start; gap: .65rem; font-size: .85rem; }
  .project-club-header img { width: 64px; height: 64px; }
  .projects-module th,
  .projects-module td { padding: .45rem; }
  .project-variant-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-module-constraints { grid-template-columns: 1fr; gap: .1rem; }
  .project-module-constraints dd { margin-block-end: .6rem; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  @page atu-plan { size: A3 landscape; margin: 15mm; }
  @page atu-rf { size: 420mm 594mm; margin: 15mm; }
  @page atu-flow { size: A3 portrait; margin: 15mm; }
  @page radio-kit-a4 { size: A4 landscape; margin: 0; }
  @page radio-kit-a3 { size: A3 landscape; margin: 0; }
  @page radio-kit-plan-a4 { size: A4 landscape; margin: 10mm; }
  @page radio-kit-plan-a3 { size: A3 landscape; margin: 10mm; }
  body[data-route="projects"] {
    --text: #111; --muted: #333; --panel: #fff; --panel-2: #f3f3f3;
    --panel-3: #fff; --border: #999; --accent: #222; --accent-strong: #111;
    display: block; color: #111; background: white; font-size: 10pt; line-height: 1.4;
  }
  body[data-route="projects"] > :not(main),
  body[data-route="projects"] #main-content > :not(.projects-module),
  body[data-route="projects"] .project-intro,
  body[data-route="projects"] .project-related { display: none !important; }
  body[data-route="projects"] #main-content,
  body[data-route="projects"] .projects-module,
  body[data-route="projects"] .project-dossier {
    display: block; width: 100%; max-width: none; min-height: 0; padding: 0; margin: 0;
    background: white; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
  }
  body[data-route="projects"] a { color: #111 !important; }
  .project-club-header { break-inside: avoid; }
  .project-club-header img { width: 22mm; height: 22mm; }
  .project-dossier h2 { font-size: 20pt; }
  .project-dossier h3 { font-size: 14pt; break-after: avoid; }
  .project-dossier h4 { font-size: 11pt; }
  .project-dossier > section { margin-block-start: 6mm; }
  .project-variant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); break-inside: avoid; gap: 3mm; }
  .project-variant { padding: 3mm; }
  .projects-module table { font-size: 8pt; table-layout: fixed; }
  .projects-module th,
  .projects-module td { padding: 2mm; overflow-wrap: anywhere; }
  .projects-module .table-wrap { overflow: visible; }
  .projects-module thead { display: table-header-group; }
  .projects-module tr,
  .project-diagram { break-inside: avoid; }
  .project-diagram img { max-height: 150mm; object-fit: contain; }
  .project-diagram figcaption { color: #333; }
  .project-dossier p { orphans: 3; widows: 3; }
  .project-disclaimer { break-inside: avoid; font-size: 9pt; }
  #dummy-record { break-before: page; break-inside: avoid; }
  .project-measurements dd { min-height: 9mm; border-bottom: 1px solid #999; }
  .project-measurements dd span { display: none; }
  .project-variant-detail { break-before: page; border: 0; padding-block-start: 0; }
  #dummy-variant-details > h3 { display: none; }
  #atu-variants > h3,
  #atu-variants > p { display: none; }
  #atu-record { break-before: page; break-inside: avoid; }
  .project-variant-detail h4,
  .project-variant-detail h5 { break-after: avoid; }
  .project-variant-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); break-inside: avoid; gap: 2mm; }
  .project-variant-specs > div { padding: 2mm; }
  .project-module-constraints { break-inside: avoid; font-size: 9pt; }
  .project-variant-diagram img { max-height: 110mm; }
  .project-variant-club { display: flex; gap: 3mm; align-items: center; margin-block-end: 4mm; padding-block-end: 2mm; border-bottom: 1px solid #999; break-inside: avoid; }
  .project-variant-club img { width: 14mm; height: 14mm; object-fit: contain; }
  .project-variant-club address { font-size: 8pt; font-style: normal; }
  .atu-plan-sheet { page: atu-plan; width: 390mm; max-width: none; break-before: page; break-after: page; }
  .atu-rf-sheet { page: atu-rf; width: 390mm; max-width: none; break-before: page; break-after: page; }
  .atu-flow-sheet { page: atu-flow; width: 267mm; max-width: none; break-before: page; break-after: page; }
  .atu-module .atu-plan-sheet img { max-height: 245mm; width: 100%; object-fit: contain; }
  .atu-module .atu-rf-sheet img { max-height: 535mm; width: 100%; object-fit: contain; }
  .atu-module .atu-flow-sheet img { max-height: 365mm; width: 100%; object-fit: contain; }
  .radio-kits-module .radio-kit-picker,
  .radio-kits-module .radio-kit-files,
  .radio-kits-module .radio-kit-cover { display: none !important; }
  .radio-kit-reading,
  .schematic-viewer { display: none !important; }
  .radio-kits-module .radio-kit-project { break-before: page; padding: 0; margin: 0; border: 0; }
  .radio-kits-module .radio-kit-project > h3 { font-size: 18pt; }
  .radio-kits-module .radio-kit-purpose { display: block; margin-block: 4mm; }
  .radio-kits-module .radio-kit-purpose section { margin-block-end: 4mm; }
  .radio-kits-module .project-tech { line-height: 1.4; }
  .radio-kits-module .project-tech > section { margin-block-start: 6mm; }
  .radio-kits-module .radio-kit-bom { min-width: 0; }
  .radio-kits-module .radio-kit-mechanics { display: block; }
  .radio-kits-module .radio-kit-record { break-before: page; break-inside: avoid; }
  .radio-kits-module .radio-kit-sheet { margin: 0; padding: 0; max-width: none; break-before: page; break-after: page; }
  .radio-kits-module .radio-kit-sheet a { display: block; width: 100%; height: 100%; }
  .radio-kits-module .radio-kit-sheet img { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; border: 0; border-radius: 0; }
  .radio-kits-module .radio-kit-sheet figcaption { display: none; }
  .radio-kits-module .radio-kit-sheet-a4 { page: radio-kit-a4; width: 297mm; height: 210mm; }
  .radio-kits-module .radio-kit-sheet-a3 { page: radio-kit-a3; width: 420mm; height: 297mm; }
  .radio-kits-module .radio-kit-plan { margin: 0; padding: 0; width: auto; max-width: none; break-before: page; break-after: page; }
  .radio-kits-module .radio-kit-plan img { width: auto; height: auto; max-width: none; max-height: none; border-radius: 0; }
  .radio-kits-module .radio-kit-plan-a4 { page: radio-kit-plan-a4; width: 277mm; }
  .radio-kits-module .radio-kit-plan-a3 { page: radio-kit-plan-a3; width: 390mm; }
}
