:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #62656b;
  --paper: #f5f2ea;
  --surface: #fffdf7;
  --line: #cbc7bc;
  --lime: #c8ff4d;
  --lime-dark: #769c13;
  --blue: #3867d6;
  --warning: #9b4d00;
  --danger: #a62929;
  --shadow: 0 18px 50px rgb(32 33 36 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; }
button, input, textarea, select { font: inherit; }
button, .download-zip {
  border: 2px solid var(--ink); border-radius: .7rem; background: var(--ink); color: #fff;
  padding: .72rem 1rem; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-flex;
  justify-content: center; align-items: center; min-height: 2.75rem;
}
button:hover, .download-zip:hover { transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .65; transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 4px solid var(--blue); outline-offset: 3px;
}
.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: .5rem; inset-inline-start: .5rem; padding: .75rem 1rem; background: #fff; border: 2px solid var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header {
  min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(1rem, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgb(245 242 234 / 96%);
  position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px);
}
.app-brand, .chapa-link { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.app-brand span { display: grid; line-height: 1.1; }
.app-brand strong { font-size: 1.15rem; }
.app-brand small { color: var(--muted); font-size: .72rem; margin-top: .2rem; }
.desktop-nav { display: flex; align-items: center; gap: .9rem; font-size: .9rem; }
.desktop-nav > a:not(.chapa-link) { text-decoration: none; padding: .45rem .15rem; border-bottom: 2px solid transparent; }
.desktop-nav > a[aria-current="page"] { border-color: var(--ink); font-weight: 800; }
.chapa-link { font-weight: 700; max-width: 12rem; }
.language-picker { display: flex; align-items: center; gap: .4rem; }
.language-picker span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.language-picker select { border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); padding: .5rem .65rem; color: var(--ink); }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { cursor: pointer; font-weight: 800; border: 2px solid var(--ink); border-radius: .6rem; padding: .5rem .7rem; }
.mobile-menu > div { position: absolute; inset-inline-end: 0; top: calc(100% + .5rem); width: min(20rem, calc(100vw - 2rem)); background: var(--surface); border: 2px solid var(--ink); border-radius: .8rem; padding: .75rem; box-shadow: var(--shadow); display: grid; gap: .35rem; }
.mobile-menu > div > a { padding: .6rem; text-decoration: none; border-radius: .4rem; }
.mobile-menu .language-picker { padding: .45rem .6rem; }
.hero { padding-block: clamp(3rem, 7vw, 7rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr); gap: 3rem; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 850; font-size: .78rem; margin: 0 0 1rem; color: var(--lime-dark); }
h1 { font-size: clamp(2.6rem, 7vw, 6.5rem); line-height: .92; letter-spacing: -.055em; margin: 0; max-width: 14ch; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.45rem); max-width: 52rem; color: #41444a; }
.trust-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.trust-row span, .badge { border: 1px solid var(--ink); border-radius: 999px; padding: .35rem .65rem; background: var(--surface); font-size: .78rem; font-weight: 750; }
.hero-graphic { position: relative; min-height: 22rem; display: grid; place-items: center; }
.hero-graphic > img { filter: drop-shadow(0 20px 35px rgb(32 33 36 / 18%)); }
.hero-graphic > div { position: absolute; inset: 1rem; }
.hero-graphic span { position: absolute; background: var(--ink); color: #fff; padding: .35rem .6rem; border-radius: .35rem; font-size: .76rem; font-weight: 800; transform: rotate(-3deg); }
.hero-graphic span:nth-child(1) { top: 2%; left: 0; }
.hero-graphic span:nth-child(2) { top: 17%; right: 0; transform: rotate(4deg); }
.hero-graphic span:nth-child(3) { bottom: 20%; left: 2%; transform: rotate(3deg); }
.hero-graphic span:nth-child(4) { bottom: 4%; right: 7%; transform: rotate(-4deg); }
.hero-graphic span:nth-child(5) { top: 48%; right: -4%; }
.explain { padding-block: 4rem; border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(16rem, .65fr) minmax(0, 1.35fr); gap: 3rem; }
.section-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); font-weight: 800; margin: 0 0 .6rem; }
h2 { font-size: clamp(2rem, 4.4vw, 4.2rem); line-height: 1; letter-spacing: -.04em; margin: 0 0 1rem; }
h3 { line-height: 1.15; }
.explain-main > p:last-child { font-size: 1.12rem; }
.explain-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.explain-grid article { background: var(--surface); padding: 1.35rem; min-width: 0; }
.explain-grid h3 { margin-top: 0; }
.explain-grid ul { padding-inline-start: 1.2rem; }
.situations, .standards { background: var(--ink); color: #fff; padding-block: 5rem; }
.section-head { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
.section-head > div { max-width: 50rem; }
.section-head p { color: inherit; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card-grid article { border: 1px solid currentColor; border-radius: .9rem; padding: 1.4rem; min-height: 11rem; }
.card-grid h3 { margin-top: 0; font-size: 1.35rem; }
.tool-section { padding-block: 5rem 8rem; }
.status-region { min-height: 2rem; margin-bottom: 1rem; font-weight: 800; }
.status-region[data-level="error"] { color: var(--danger); }
.status-region[data-level="warning"] { color: var(--warning); }
.status-region[data-level="success"] { color: #3c6410; }
.work-card { background: var(--surface); border: 2px solid var(--ink); border-radius: 1rem; padding: clamp(1rem, 2.4vw, 1.7rem); margin-block: 1.2rem; box-shadow: 8px 8px 0 var(--ink); min-width: 0; }
.work-card h3 { font-size: clamp(1.45rem, 3vw, 2.3rem); margin: 0 0 .4rem; }
.work-head, .authors-head, .final-actions { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.work-head p { margin: .3rem 0 0; color: var(--muted); }
.button-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.secondary-button, .icon-button, .text-button { background: transparent; color: var(--ink); }
.icon-button, .text-button { padding: .45rem .65rem; min-height: 2.2rem; font-size: .85rem; }
.danger { color: var(--danger); border-color: var(--danger); }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: .87rem; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem; text-align: start; vertical-align: top; }
th { background: #efecdf; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
td code { overflow-wrap: anywhere; font-size: .78rem; }
td[data-state="ready"] { color: #3c6410; font-weight: 800; }
td[data-state="failed"] { color: var(--danger); font-weight: 800; }
.empty-state { border: 1px dashed var(--line); padding: 1rem; color: var(--muted); border-radius: .6rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1.2rem; }
.field { display: grid; gap: .35rem; min-width: 0; font-weight: 700; }
.field.wide { grid-column: 1 / -1; }
.field small { color: var(--muted); font-weight: 450; }
.field input, .field select, .field textarea, td input { width: 100%; min-width: 0; border: 1px solid #979990; border-radius: .55rem; padding: .68rem; color: var(--ink); background: #fff; }
.field textarea { resize: vertical; }
.field b { color: var(--danger); }
.authors-head { align-items: center; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.authors-head h4 { font-size: 1.25rem; margin: 0; }
.author-card { border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; margin-top: 1rem; }
.author-card legend { font-weight: 850; padding-inline: .4rem; }
.author-grid { margin: 0; }
.originals-box { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1.25rem; display: grid; gap: .75rem; }
.check-row { display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; }
.check-row input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.check-row span { display: grid; }
.check-row small { color: var(--muted); }
.confirm-row { background: #fff2d8; border: 1px solid #d79113; border-radius: .6rem; padding: .8rem; }
.final-actions { margin-top: 1.5rem; justify-content: flex-start; }
.primary-large { background: var(--lime); color: var(--ink); padding-inline: 1.4rem; }
.validation-list { border-radius: .6rem; padding: .8rem 1rem .8rem 2rem; }
.validation-list.error { background: #ffe9e9; color: #7d1717; }
.validation-list.success { background: #eaffca; color: #2e5607; }
.results-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 1rem; align-items: start; }
.results-grid .work-card { margin: 0; box-shadow: none; }
.artifact-list { display: grid; gap: .7rem; }
.artifact-card { border: 1px solid var(--line); border-radius: .65rem; padding: .8rem; }
.artifact-card h3 { font-size: 1rem; overflow-wrap: anywhere; }
.artifact-card p { font-family: ui-monospace, monospace; font-size: .72rem; overflow-wrap: anywhere; }
.artifact-card button { font-size: .8rem; min-height: 2.2rem; padding: .4rem .65rem; }
.download-zip { margin-top: 1rem; width: 100%; background: var(--lime); color: var(--ink); }
.editorial-hero { padding-block: clamp(3rem, 7vw, 7rem) 3rem; }
.editorial-hero h1 { max-width: 17ch; }
.editorial-section { padding-block: 3rem 5rem; }
.steps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
.steps-grid article { border: 2px solid var(--ink); border-radius: 1rem; padding: 1.3rem; background: var(--surface); min-height: 12rem; }
.steps-grid h2 { font-size: 1.7rem; }
.standards h2 { max-width: 16ch; }
.note { margin-top: 2rem; border-inline-start: .5rem solid var(--blue); background: #eef3ff; padding: 1.2rem; }
.note h2 { font-size: 1.5rem; }
.danger-note { border-color: var(--danger); background: #ffecec; }
.case-list { display: grid; gap: 1rem; }
.case-list article { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; border-top: 2px solid var(--ink); padding-block: 1.5rem; }
.case-list article > span { font-family: ui-monospace, monospace; font-weight: 850; font-size: 1.4rem; }
.case-list h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
.case-role { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; color: var(--muted); font-weight: 850; }
.privacy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-bottom: 7rem; }
.privacy-grid article { background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; padding: 1.25rem; }
.privacy-grid h2 { font-size: 1.6rem; }
.privacy-wide { grid-column: 1 / -1; }
.chapa-banner { position: sticky; bottom: 0; z-index: 35; background: #111; color: #fff; padding: .72rem max(1rem, env(safe-area-inset-left)); display: grid; grid-template-columns: 1fr auto; gap: .7rem 1.2rem; align-items: center; }
.chapa-banner p { margin: 0; font-weight: 800; font-size: .86rem; }
.chapa-banner nav { display: flex; gap: .8rem; flex-wrap: wrap; }
.chapa-banner a { color: #fff; font-size: .82rem; }
.not-found { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 2rem; }
.not-found p:first-of-type { font-family: ui-monospace, monospace; font-size: 2rem; margin-bottom: 0; }
.not-found h1 { font-size: clamp(2.5rem, 8vw, 5rem); max-width: none; }
.not-found a { margin-top: 1rem; border: 2px solid var(--ink); padding: .7rem 1rem; border-radius: .6rem; background: var(--lime); text-decoration: none; font-weight: 800; }
[dir="rtl"] .hero-graphic span { transform: rotate(3deg); }
[dir="rtl"] .case-list article { grid-template-columns: 1fr 4rem; }
[dir="rtl"] .case-list article > span { grid-column: 2; grid-row: 1; }
[dir="rtl"] .case-list article > div { grid-column: 1; grid-row: 1; }
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero-graphic { min-height: 16rem; }
  .hero-graphic img { width: 190px; }
  .explain { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { min-height: 4.4rem; }
  .app-brand small { display: none; }
  .app-brand img { width: 36px; height: 36px; }
  .hero { padding-top: 2.2rem; gap: 1rem; }
  h1 { font-size: clamp(2.35rem, 13vw, 4.2rem); }
  .hero-graphic { min-height: 13rem; }
  .explain-grid, .form-grid, .steps-grid, .privacy-grid { grid-template-columns: 1fr; }
  .field.wide, .privacy-wide { grid-column: auto; }
  .work-card { box-shadow: 4px 4px 0 var(--ink); }
  .button-row, .button-row button, .final-actions, .final-actions button { width: 100%; }
  .chapa-banner { position: static; grid-template-columns: 1fr; }
  .case-list article { grid-template-columns: 2.6rem 1fr; }
  [dir="rtl"] .case-list article { grid-template-columns: 1fr 2.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  button:hover, .download-zip:hover { transform: none; }
}
