/* SPDX-License-Identifier: MIT */
/* SPDX-FileCopyrightText: 2026 Mohammed Abdul Hannan */
/* The website pages of D-036, after the "OpenNAOE front page" design canvas (screenshots in site/design/).
   Brand: ink #012555, accent #3576AA, paper #F5F7F6; Archivo for text, IBM Plex Mono for labels. */

:root {
  --ink: #012555;
  --ink-hover: #0B3A75;
  --accent: #3576AA;
  --paper: #F5F7F6;
  --card: #FFFFFF;
  --band: #DCE7F3;          /* the navigation band */
  --band-rule: #C3D3E4;
  --band-hover: #C6D7EA;
  --tint: #EAF0F3;          /* banners and the tools section */
  --rule: #D3DBE2;
  --text-2: #22344A;        /* body text on cards */
  --muted: #46586A;         /* labels, captions and secondary text */
  --field: #6F7F8E;         /* borders of form fields and planned-state marks */
  --error: #A61B1B;
  --error-bg: #FDF3F2;
  --foot-text: #C9D4DC;
  --font-text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-label: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: 18px; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, p, dl, dd, figure, pre, ol, ul { margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* skip link */
.skip-link { position: absolute; left: 16px; top: -120px; z-index: 100; padding: 12px 18px; background: #FFFFFF; color: var(--ink); font-weight: 700;
  border: 2px solid var(--ink); border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* preview ribbon: shown on builds that are not a release (site/build.py --release leaves it out) */
.preview-ribbon { background: #FFF4D6; color: #4A3500; border-bottom: 1px solid #E9D28C; font-size: 15px; line-height: 1.45; }
.preview-ribbon p { max-width: 1200px; margin: 0 auto; padding: 8px 24px; }

/* navigation band and links */
.nav-band { background: var(--band); border-bottom: 1px solid var(--band-rule); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-size: 16px; font-weight: 500; transition: background-color .15s, color .15s; }
.nav-link:hover { background: var(--band-hover); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.nav-link[aria-current="page"]:hover { background: var(--ink-hover); color: #FFFFFF; }

/* header of every page but the home page: the logo and the main navigation in one band */
.site-header .wrap { max-width: 1200px; margin: 0 auto; padding: 8px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.site-header .logo { display: inline-flex; align-items: center; min-height: 48px; }
.site-header .logo img { height: 50px; width: auto; display: block; }

/* header of the home page: the logo larger, the tagline, and the navigation band under them */
.home-header { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: clamp(10px, 1.4vw, 18px) 24px clamp(10px, 1.2vw, 14px); text-align: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #E4EDF7 100%); }
.home-header h1 { width: 100%; max-width: 380px; line-height: 0; }
.home-header h1 a { display: block; }
.home-header h1 img { width: 100%; height: auto; display: block; }
.home-header .tagline { max-width: 1152px; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.45; color: var(--muted); }
.home-nav { border-top: 1px solid var(--band-rule); }
.home-nav .nav-list { margin: 0 auto; padding: 6px 16px; max-width: 1200px; justify-content: center; gap: 4px 6px; }
.home-nav .nav-link { padding: 0 16px; font-size: 17px; }

/* The header stays at the top of the window while the page scrolls (D-049), where the window is large enough for it
   not to cover much of the page: from 720 CSS px wide, and on the home page its logo and tagline only in a tall
   window, the navigation band alone otherwise. A place reached by a link or the keyboard is scrolled below it
   (scroll-padding, WCAG 2.2 SC 2.4.11). On a phone the header scrolls with the page. */
.home-top { display: contents; }
@media (min-width: 720px) and (min-height: 540px) {
  .site-header, .home-nav { position: sticky; top: 0; z-index: 50; }
  html { scroll-padding-top: 84px; }
}
@media (min-width: 720px) and (max-width: 879px) and (min-height: 540px) { html { scroll-padding-top: 132px; } }
@media (min-width: 720px) and (min-height: 820px) {
  .home-top { display: block; position: sticky; top: 0; z-index: 50; }
  .home-top .home-nav { position: static; }
  html:has(.home-top) { scroll-padding-top: 236px; }
}

/* footer of every page */
.site-footer { background: var(--ink); color: #E8EEF2; }
.site-footer .wrap { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 8px 40px; justify-content: space-between; align-items: center; }
.site-footer .foot-brand { flex: 1 1 560px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.site-footer .foot-brand img { height: 38px; width: auto; display: block; flex: none; }
.site-footer .foot-brand p { flex: 1 1 380px; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--foot-text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; font-size: 15px; }
.site-footer a:hover { color: #FFFFFF; text-decoration-thickness: 2px; }
.site-footer a:focus-visible { outline-color: #FFFFFF; }

/* the main column of a page */
.main { max-width: 1200px; margin: 0 auto; padding: clamp(24px, 3vw, 40px) 24px clamp(32px, 3.5vw, 48px); display: flex; flex-direction: column; gap: clamp(32px, 3.5vw, 48px); }
.main.w1000 { max-width: 1000px; }
.main.w860 { max-width: 860px; gap: 32px; }
.main.gap-s { gap: 24px; }
.main.about { gap: clamp(32px, 3.5vw, 48px); }
.intro { display: flex; flex-direction: column; gap: 12px; }
.main.w860 .intro { max-width: none; }
.title-l { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.title-m { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 380px) { .title-m { font-size: 26px; } }   /* "Acknowledgements" fits 288 px of text at 320 px */
.lead { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.55; }
.kicker { font-family: var(--font-label); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.mono-note { font-family: var(--font-label); font-size: 13px; color: var(--muted); }
.small { font-size: 15px; line-height: 1.55; }
.h2-l { font-size: clamp(30px, 3vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.h2-m { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.2; font-weight: 700; }
.h2-s { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.25; font-weight: 700; }
.h2-xs { font-size: 24px; line-height: 1.25; font-weight: 700; }
.h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.stack-m { display: flex; flex-direction: column; gap: 20px; }
.stack-l { display: flex; flex-direction: column; gap: 24px; }
.stack-xs { display: flex; flex-direction: column; gap: 8px; }

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--ink); color: #FFFFFF; border: 0; }
.btn-primary:hover { background: var(--ink-hover); color: #FFFFFF; }
.btn-secondary { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--band); color: var(--ink); }

/* status of a book or a tool: a filled dot for "Available"; a ring for "In development"; a dashed ring, in grey,
   for "In preparation". The word carries the status; the mark repeats it. */
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-label); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.status svg { width: 12px; height: 12px; flex: none; }
.status.planned { color: var(--muted); }

/* section heads of the home page: a label, a title and a line, with a link at the right */
.section-head { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; justify-content: space-between; }
.section-head > div { display: flex; flex-direction: column; gap: 8px; flex: 1 1 560px; }
.section-head .all { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-underline-offset: 4px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 22px; line-height: 1.2; font-weight: 700; }
.card p { font-size: 17px; color: var(--muted); }
.card > .btn-row:last-child { margin-top: auto; padding-top: 4px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
/* three or four cards to a row; two rows of two, or one column, where they do not fit, so that no card stands alone */
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1060px) { .card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .card-grid.cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .card-grid.cols-4 { grid-template-columns: minmax(0, 1fr); } }
.card-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
a.card-link { color: inherit; text-decoration: none; }
a.card-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.feature { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(24px, 3vw, 40px); display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 32px; align-items: center; }
.feature .text, .banner .text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.feature h3 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; font-weight: 700; }
.feature .text > p, .banner .text > p { color: var(--text-2); }
.feature .text > p.facts, .banner .text > p.facts { font-family: var(--font-label); font-size: 14px; color: var(--muted); }

/* the banner of a book's planned-contents page (D-046) */
.banner { background: var(--tint); border: 1px solid var(--rule); border-radius: 16px; padding: clamp(24px, 3vw, 40px); display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 32px; align-items: center; }
.banner h2, .banner h1 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; font-weight: 700; }
.crumb { font-size: 16px; margin-bottom: calc(-1 * clamp(24px, 3vw, 44px)); }
.crumb a { font-weight: 600; }
.narrow { max-width: 860px; }
.credit { font-size: 17px; color: var(--muted); margin-top: calc(-1 * clamp(20px, 2.5vw, 36px)); }
.credit a { font-weight: 600; }
code.hash { font-family: var(--font-label); font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }

/* banner images: a common frame (360:232), labels as SVG text over the picture (D-036); no caption, but a
   photograph's credit or an illustration's label on the image (D-049) */
.art { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.art.framed { background: var(--card); border-radius: 12px; padding: 16px; }
.art .frame { width: 100%; max-width: 440px; position: relative; }
.art .frame img { width: 100%; height: auto; display: block; border-radius: 10px; }
.art .frame > svg { display: block; width: 100%; height: auto; }
.art .frame .overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; overflow: visible; }
/* the credit or label sits on the lower edge of the frame, so that it hides nothing in the picture */
.art { position: relative; }
.art > .art-tag { position: absolute; right: 8px; bottom: -10px; max-width: calc(100% - 16px); padding: 1px 7px; border-radius: 4px;
  background: var(--ink); color: #FFFFFF; font-size: 11.5px; line-height: 1.5; }

/* planned contents of a book whose chapters are not yet written (D-046) */
.banner .text > p.byline { font-size: 16px; color: var(--muted); }
.plan .note { color: var(--muted); }
.plan-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.plan-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.plan-list li:first-child { border-top: 1px solid var(--rule); }
.plan-list h3 { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 20px; line-height: 1.3; font-weight: 700; }
.plan-list .num { font-family: var(--font-label); font-size: 13px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); flex: none; }
.plan-list p { margin-top: 6px; color: var(--text-2); }

/* a book or a tool on the Books and Simulation tools pages (D-049): the status, then the title with the button at
   the right of its row, the summary and the facts, beside a smaller image. The button follows the title in the
   source (build.py). */
.main.listing-page { gap: clamp(20px, 2.4vw, 28px); }
.listings { display: flex; flex-direction: column; gap: 20px; }
.listing { background: var(--tint); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(18px, 2.2vw, 24px) clamp(20px, 2.6vw, 32px) clamp(22px, 2.4vw, 28px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto 240px; grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "status status art" "title action art" "summary summary art" "facts facts art"; gap: 10px 32px; align-items: start; }
.listing > .status { grid-area: status; align-self: center; }
.listing > .action { grid-area: action; justify-self: end; align-self: center; }
.listing > .action .btn { white-space: nowrap; }
.listing > h2 { grid-area: title; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.2; font-weight: 700; }
.listing > .summary { grid-area: summary; font-size: 17px; color: var(--text-2); }
.listing > .facts { grid-area: facts; font-family: var(--font-label); font-size: 14px; color: var(--muted); }
.listing > .art { grid-area: art; }
.listing .art.framed { padding: 8px; border-radius: 10px; }
.listing .art .frame { max-width: none; }
.listing .art .frame img { border-radius: 6px; }
@media (max-width: 760px) {
  .listing { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none;
    grid-template-areas: "status status" "title action" "summary summary" "facts facts" "art art"; gap: 10px 20px; }
  .listing > .art { justify-self: start; width: min(100%, 320px); }
}
@media (max-width: 520px) {
  .listing { grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "title" "summary" "facts" "action" "art"; }
  .listing > .action { grid-area: action; justify-self: start; }
  .listing > .action .btn { white-space: normal; }
}

/* a tool's own page (D-049): its status, name and buttons, then its description */
.main.tool-main { gap: clamp(24px, 2.8vw, 36px); }
.tool-head { background: var(--tint); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(20px, 2.6vw, 32px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tool-head h1 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.15; font-weight: 700; }
.tool-main .credit { margin-top: calc(-1 * clamp(10px, 1.4vw, 18px)); }

/* a tool's description on its page */
.details { display: flex; flex-direction: column; gap: 18px; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px 40px; }
.specs > div { display: flex; flex-direction: column; gap: 4px; }
.specs dt { font-family: var(--font-label); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 15px; line-height: 1.55; color: var(--muted); }
.changes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* the tools section of the home page */
.band-section { background: var(--tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-section > .inner { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 3vw, 44px) 24px; display: flex; flex-direction: column; gap: 24px; }
.home-intro { max-width: 1200px; margin: 0 auto; padding: clamp(20px, 2.5vw, 32px) 24px clamp(16px, 2vw, 24px); display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.home-intro p { font-size: clamp(19px, 1.65vw, 24px); line-height: 1.55; }
.home-books { max-width: 1200px; margin: 0 auto; padding: 8px 24px clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 24px; }
/* how OpenNAOE is made, news and contact, on the home page */
.home-about { max-width: 1200px; margin: 0 auto; padding: 8px 24px clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: clamp(28px, 3vw, 40px); }
.contact-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.contact-line h2 { font-size: inherit; line-height: inherit; font-weight: 700; }
.home-credit { width: calc(100% - 48px); max-width: 1152px; margin: 0 auto; padding: clamp(14px, 1.6vw, 20px) 0; border-top: 1px solid var(--rule); text-align: center; }
.home-credit p { font-size: 17px; color: var(--muted); }
.home-credit a { font-weight: 600; text-underline-offset: 4px; }

/* how OpenNAOE is made and news, on the home page */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.principles .card { gap: 8px; }
.principles .card p { color: var(--text-2); }
.principles .card h3 { font-size: 20px; line-height: 1.3; }
.news { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.news li { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.news .date { flex: 0 0 150px; font-family: var(--font-label); font-size: 14px; color: var(--muted); }
.news .item { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.news .item p { font-size: 17px; }

/* code blocks (How to cite, Licences) */
pre.code { padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow-x: auto; font-family: var(--font-label); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

/* tables (Licences, Acknowledgements) */
.table-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.table-card.licence-text { padding: 16px 20px; }
.table-card.scroll { overflow-x: auto; }
table.plain { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.5; }
table.plain caption { caption-side: top; text-align: left; padding: 20px 24px 8px; font-family: var(--font-label); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
table.plain th, table.plain td { text-align: left; vertical-align: top; }
table.plain.data th, table.plain.data td { padding: 10px 20px; border-top: 1px solid var(--rule); }
table.plain.data thead th { border-top: 0; font-family: var(--font-label); font-size: 13px; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
table.licences thead th { padding: 12px 20px; font-family: var(--font-label); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
table.licences tbody th, table.licences tbody td { padding: 14px 20px; border-top: 1px solid var(--rule); }
table.licences tbody th { font-weight: 600; width: 38%; }
table.ack { min-width: 640px; }
table.ack thead th { padding: 12px 24px; border-bottom: 2px solid var(--ink); font-weight: 700; }
table.ack thead th:first-child { width: 26%; }
table.ack thead th:nth-child(2) { width: 40%; }
table.ack tbody th, table.ack tbody td { padding: 18px 24px; border-bottom: 1px solid var(--rule); font-weight: 400; }
table.ack tbody tr:last-child > * { border-bottom: 0; }
table.ack .who { display: block; font-weight: 600; }
table.ack .role { display: block; color: var(--muted); font-size: 15px; }
table.ack td.empty { padding: 18px 24px; color: var(--muted); }
/* on a phone the list of contributions becomes one card per contribution; the table keeps its semantics (D-036) */
@media (max-width: 640px) {
  table.ack { min-width: 0; }
  table.ack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.ack tr { display: block; border-bottom: 1px solid var(--rule); }
  table.ack tbody tr:last-child { border-bottom: 0; }
  table.ack tbody th, table.ack tbody td { display: block; padding: 4px 20px; border: 0; }
  table.ack tbody th { padding-top: 16px; }
  table.ack tbody td:last-child { padding-bottom: 16px; }
  table.ack tbody td.empty { padding: 16px 20px; }
  table.ack td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-label); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}

/* Feedback */
.feedback-grid { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.feedback-grid .letter { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.feedback-grid .letter h2 { margin-top: 12px; font-size: 24px; line-height: 1.25; font-weight: 700; }
.form-card { flex: 1.3 1 520px; min-width: 0; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: clamp(24px, 3vw, 40px); }
.form-card [hidden] { display: none !important; }
.form-card form, .form-card .sent { display: flex; flex-direction: column; gap: 24px; }
.form-card .sent { gap: 16px; align-items: flex-start; }
.form-card > h2 { margin-bottom: 24px; }
.form-card h2 { font-size: 28px; line-height: 1.2; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, fieldset legend { font-weight: 600; }
.field label .opt, legend .opt, .rights .opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field textarea {
  min-height: 48px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: 8px; font: inherit; color: var(--ink); background: #FFFFFF; }
.field textarea { padding: 12px 14px; resize: vertical; }
.field input[type="file"] { min-height: 48px; padding: 10px 0; font: inherit; font-size: 16px; color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.hint { font-size: 15px; color: var(--muted); }
.err { font-size: 16px; color: var(--error); }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.rights { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--rule); border-radius: 8px; background: var(--paper); }
.rights.invalid { border-color: var(--error); }
.rights .row { display: flex; gap: 12px; align-items: flex-start; }
.rights label { font-size: 16px; line-height: 1.5; }
.rights input, .choice input { width: 22px; height: 22px; flex: none; accent-color: var(--ink); }
.rights input { margin: 3px 0 0; }
fieldset.ack-choice { margin: 0; padding: 16px 18px 18px; border: 1.5px solid var(--field); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
fieldset.ack-choice.invalid { border-color: var(--error); }
fieldset.ack-choice legend { padding: 0 6px; }
.choice { display: flex; gap: 12px; align-items: center; min-height: 44px; }
.choice input { margin: 0; }
.choice label { font-size: 17px; line-height: 1.45; }
.form-alert { border: 2px solid var(--error); border-radius: 8px; padding: 16px 20px; background: var(--error-bg); }
.form-alert p { font-weight: 700; color: var(--error); margin-bottom: 6px; }
.form-alert ul { margin: 0; padding-left: 20px; }
.form-alert a { color: var(--error); }
.form-note { border: 1.5px solid var(--field); border-radius: 8px; padding: 14px 18px; background: var(--paper); font-size: 16px; }
.submit-row { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.submit-row .btn { min-height: 52px; padding: 0 32px; }
.turnstile:empty { display: none; }

/* the installation guide of a tool in a container (D-049): the README and the guides of its download package */
.guide-toc ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; }
.guide-part { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; border-top: 1px solid var(--rule); }
.guide-part h2 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; font-weight: 700; }
.guide-part h3 { font-size: 22px; line-height: 1.3; font-weight: 700; margin-top: 12px; }
.guide-part h4 { font-size: 19px; line-height: 1.35; font-weight: 700; margin-top: 6px; }
.guide-part ul, .guide-part ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.guide-part code { font-family: var(--font-label); font-size: 0.86em; overflow-wrap: anywhere; }
.guide-part :not(pre) > code { padding: 1px 5px; background: var(--card); border: 1px solid var(--rule); border-radius: 4px; }
.guide-part pre { padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow-x: auto; }
.guide-part pre code { font-size: 14px; overflow-wrap: normal; }
.guide-part table { border-collapse: collapse; font-size: 16px; }
.guide-part th, .guide-part td { padding: 8px 12px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
