@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("nunito-latin-variable.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --canvas: #fbf7ef;
  --raised: #fffdf8;
  --ink: #2c3033;
  --muted: #6e6d66;
  --line: #ded7c8;
  --surface: rgba(255, 253, 248, 0.94);
  --surface-solid: #fffdf8;
  --teal: #3899ad;
  --orange: #c77700;
  --lime: #72881f;
  --purple: #7953a8;
  --success: #2f7d32;
  --notice-bg: #eef5e8;
  --notice-ink: #245728;
  --draft-bg: #fff1d8;
  --draft-ink: #65410d;
  --shadow: 0 18px 50px rgba(44, 48, 51, 0.09);
  --pattern: url("seigaiha-light.svg");
  --page-gutter: clamp(1rem, 4vw, 2.5rem);
  --content-width: 70rem;
  --prose-width: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #202225;
    --raised: #292c30;
    --ink: #f4f0e7;
    --muted: #b7b7af;
    --line: #42464b;
    --surface: rgba(41, 44, 48, 0.95);
    --surface-solid: #292c30;
    --teal: #27afc8;
    --orange: #ffb24a;
    --lime: #a5c83b;
    --purple: #a98bd7;
    --success: #8bd35f;
    --notice-bg: #253a2b;
    --notice-ink: #bce7a7;
    --draft-bg: #49371f;
    --draft-ink: #ffd28f;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    --pattern: url("seigaiha-dark.svg");
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: var(--pattern);
  background-repeat: repeat;
  background-size: 88px 44px;
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.62;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.shell {
  width: min(var(--content-width), calc(100% - (2 * var(--page-gutter))));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  color: var(--canvas);
  background: var(--ink);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.primary-nav {
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
  font-size: 1.04rem;
  font-weight: 650;
  letter-spacing: 0.033em;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.72rem;
}

.nav-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
.footer-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.35rem;
}

.nav-links a:hover,
.footer-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.nav-links a[aria-current="page"] {
  text-decoration-thickness: 0.15rem;
}

.hero {
  padding-block: clamp(4rem, 10vw, 8rem) 2rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.3rem);
  margin-bottom: clamp(2.5rem, 7vw, 4.75rem);
  padding: 0.85rem 1.15rem 0.85rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.brand-lockup img {
  width: clamp(3.4rem, 8vw, 4.75rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 1.1rem;
}

.wordmark {
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  font-weight: 650;
  letter-spacing: 0.033em;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.058em;
  line-height: 1.45;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 9.5vw, 7rem);
  font-weight: 750;
  letter-spacing: normal;
  line-height: 0.98;
}

.lede {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
  line-height: 1.55;
}

.notice,
.status-note {
  max-width: 52rem;
  border: 1px solid color-mix(in srgb, var(--success), transparent 62%);
  color: var(--notice-ink);
  background: var(--notice-bg);
}

.notice {
  display: grid;
  grid-template-columns: minmax(10rem, 0.34fr) 1fr;
  gap: 1rem 1.5rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 1.15rem 1.25rem;
  border-radius: 1.1rem;
}

.notice span,
.status-note {
  font-size: 0.96rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-block: 2rem clamp(4.5rem, 10vw, 7rem);
}

.resource-card {
  position: relative;
  min-height: 18rem;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.resource-card::after {
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0.17;
}

.resource-card:hover,
.resource-card:focus-visible {
  outline-color: var(--accent);
  transform: translateY(-0.25rem);
  box-shadow: 0 24px 54px rgba(44, 48, 51, 0.15);
}

.accent-teal {
  --accent: var(--teal);
}

.accent-orange {
  --accent: var(--orange);
}

.accent-lime {
  --accent: var(--lime);
}

.accent-purple {
  --accent: var(--purple);
}

.resource-card h2,
.quick-help h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.9rem, 4.5vw, 3.15rem);
  font-weight: 750;
  letter-spacing: normal;
  line-height: 1.04;
}

.resource-card p {
  max-width: 30rem;
  color: var(--muted);
}

.resource-card-wide {
  grid-column: 1 / -1;
}

.card-action {
  position: absolute;
  bottom: 2rem;
  font-weight: 730;
}

.quick-help {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-bottom: clamp(4.5rem, 10vw, 7rem);
  padding: clamp(1.7rem, 5vw, 3.5rem);
  border-radius: 1.9rem;
  color: var(--canvas);
  background: var(--ink);
}

.quick-help .eyebrow,
.quick-help p {
  color: color-mix(in srgb, var(--canvas), transparent 22%);
}

.quick-help p {
  margin-bottom: 0;
}

.resource-page {
  padding-block: clamp(2.25rem, 6vw, 4rem) clamp(5rem, 10vw, 8rem);
}

.back-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  margin-bottom: clamp(2rem, 6vw, 4rem);
  color: var(--muted);
  font-weight: 680;
  text-decoration-thickness: 0.08rem;
  text-underline-offset: 0.3rem;
}

.back-link:hover {
  color: var(--ink);
}

.resource-heading {
  max-width: 54rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.resource-heading h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 10vw, 7rem);
}

.status-note {
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-color: color-mix(in srgb, var(--orange), transparent 55%);
  border-left: 0.35rem solid var(--orange);
  border-radius: 0.5rem 1rem 1rem 0.5rem;
  color: var(--draft-ink);
  background: var(--draft-bg);
}

.prose {
  max-width: var(--prose-width);
}

.prose section {
  margin-bottom: 1rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.prose h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 750;
  letter-spacing: normal;
  line-height: 1.12;
}

.prose h3 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--ink);
}

.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child {
  margin-bottom: 0;
}

.prose li + li {
  margin-top: 0.6rem;
}

.prose a {
  color: color-mix(in srgb, var(--teal), var(--ink) 25%);
  font-weight: 690;
  text-decoration-thickness: 0.08rem;
  text-underline-offset: 0.26rem;
}

.press-prose {
  display: grid;
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.press-prose section {
  margin-bottom: 0;
}

.press-span {
  grid-column: 1 / -1;
}

.press-facts {
  display: grid;
  grid-template-columns: minmax(7rem, 0.36fr) 1fr;
  gap: 0.7rem 1rem;
  margin: 0;
}

.press-facts dt {
  color: var(--ink);
  font-weight: 750;
}

.press-facts dd {
  margin: 0;
  color: var(--muted);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.asset-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--canvas);
}

.asset-card h3 {
  margin-top: 1rem;
}

.asset-card p {
  font-size: 0.92rem;
}

.asset-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  object-fit: cover;
}

.asset-preview-icon {
  object-fit: contain;
}

.asset-download {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
}

.asset-unavailable {
  border-style: dashed;
}

.asset-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  color: var(--muted);
  background: var(--surface-solid);
  font-weight: 700;
  text-align: center;
}

.software-list {
  display: grid;
  gap: 0.8rem;
}

.software-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--canvas);
}

.software-card p {
  margin-bottom: 0.35rem;
}

.license-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
}

.external-marker {
  margin-left: 0.2em;
  font-size: 0.8em;
}

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand {
  max-width: 25rem;
}

.footer-brand strong {
  font-weight: 650;
  letter-spacing: 0.033em;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease;
}

.htmx-request.htmx-indicator,
.htmx-request .htmx-indicator {
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 48rem) {
  .primary-nav {
    align-items: flex-start;
    padding-block: 0.8rem;
  }

  .nav-links {
    max-width: 15rem;
    justify-content: flex-end;
    gap: 0 0.8rem;
  }

  .nav-links a {
    min-height: 2.5rem;
    font-size: 0.84rem;
  }

  .notice,
  .card-grid,
  .quick-help,
  .press-prose,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .press-span {
    grid-column: auto;
  }

  .resource-card {
    min-height: 16rem;
  }

  .quick-help {
    gap: 0.8rem;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 31rem) {
  .primary-nav {
    display: block;
  }

  .brand {
    margin-bottom: 0.4rem;
  }

  .nav-links {
    max-width: none;
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }
}

@media (prefers-contrast: more) {
  body {
    background-image: none;
  }

  :root {
    --muted: var(--ink);
    --surface: var(--surface-solid);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .resource-card {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .back-link,
  .skip-link {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .resource-page {
    width: 100%;
    padding: 0;
  }

  .prose section {
    break-inside: avoid;
    border: 0;
    box-shadow: none;
  }
}
