:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #25313b;
  --muted: #53616c;
  --accent: #315e7a;
  --wash: #edf2f5;
  --line: #c5ced4;
  --control: #73838e;
  --focus: #1b4c91;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 650; line-height: 1.5; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 3vw, 36px); }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; max-width: 100%; }
button, summary { cursor: pointer; }
a, button, input, summary { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: calc(100% - 64px); max-width: 1120px; margin-inline: auto; }
.site-content, main, section, article, aside,
.site-header > *, .project-grid > *, .archive-list > *, .case-body > *, .article-layout > * { min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 16px; min-height: 44px; background: var(--ink); color: #fff;
  transform: translateY(-160%);
}
.skip:focus { transform: translateY(0); }
.muted, .caption, .small { color: var(--muted); }
.caption, .small { font-size: 14px; }

.site-header {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 96px; padding-block: 20px; border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0;
  min-width: 44px;
  color: var(--ink); font-size: 28px; line-height: 1.2; font-weight: 750;
  letter-spacing: -.06em; text-decoration: none;
}
.desktop-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.desktop-nav a, .mobile-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  min-width: 44px;
  color: var(--ink); text-decoration: none;
}
.desktop-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] {
  color: var(--accent); font-weight: 650; text-decoration: underline;
}
.desktop-nav a:hover, .mobile-nav a:hover { text-decoration: underline; }
.site-menu { display: none; }
.site-menu > summary {
  min-height: 44px; padding: 8px 12px;
  color: var(--ink); border: 1px solid var(--control); background: #fff;
  list-style-position: inside;
}
.site-menu:not([open]) > .mobile-nav { display: none; }
.mobile-nav {
  position: absolute; top: calc(100% - 1px); right: 0; z-index: 20;
  display: grid; width: min(280px, 100%); padding: 8px 16px;
  border: 1px solid var(--control); background: #fff;
}
.mobile-nav a { width: 100%; padding: 8px 0; }

.page-intro { padding-block: 56px 40px; }
.page-intro h1 { max-width: 28ch; }
.lead { max-width: 68ch; margin-top: 16px; color: var(--muted); font-size: 18px; }
.work-section { padding-bottom: 56px; }
.work-section > h2 { margin-bottom: 24px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 8px; }
.section-note { max-width: 70ch; color: var(--muted); font-size: 14px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.project-card {
  display: flex; flex-direction: column; gap: 20px; min-width: 0;
  padding: 24px; border: 1px solid var(--line); background: #fff;
}
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; min-width: 0; }
.card-head h3 { min-width: 0; font-size: 24px; font-weight: 650; }
.status-badge {
  display: inline-flex; align-items: center; flex: none; align-self: flex-start;
  min-height: 30px; padding: 2px 9px; border: 1px solid var(--control);
  color: var(--ink); background: #fff; font-size: 14px; line-height: 1.6; white-space: nowrap;
}
.status-badge.demo { color: var(--accent); border-color: var(--accent); }
.status-badge.trial { color: var(--ink); background: var(--wash); }
.card-screen {
  display: grid; place-items: center; aspect-ratio: 36 / 25;
  border: 1px solid var(--line); background: #f8fafb;
}
.card-screen img { width: 100%; height: 100%; object-fit: contain; }
.card-summary { font-size: 16px; }
.card-notice {
  padding-left: 12px; border-left: 3px solid var(--accent);
  color: var(--muted); font-size: 14px; line-height: 1.8;
}
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 4px; }
.button {
  display: inline-flex; justify-content: center; align-items: center;
  min-height: 44px; max-width: 100%; padding: 9px 16px;
  border: 1px solid var(--control); background: #fff; color: var(--ink);
  font-size: 16px; line-height: 1.6; text-align: center; text-decoration: none;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button:hover { text-decoration: underline; }
.button.primary:hover { background: #284d65; }

.archive-section { padding-block: 32px 48px; border-top: 1px solid var(--line); }
.archive-section > h2 { margin-bottom: 20px; }
.archive-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.archive-item { padding-block: 20px; border-top: 1px solid var(--line); }
.archive-item h3 { font-size: 20px; margin-bottom: 8px; }
.archive-item p { color: var(--muted); font-size: 14px; }
.archive-item .state, .archive-item .archive-state { color: var(--ink); }

.journal-section { padding-block: 8px 48px; }
.journal-section > h2 { margin-bottom: 20px; }
.journal-list { padding-bottom: 48px; }
.article-row { display: block; padding-block: 24px; border-top: 1px solid var(--line); }
.article-row:last-child { border-bottom: 1px solid var(--line); }
a.article-row { color: inherit; text-decoration: none; }
.article-row h2, .article-row h3 { font-size: 22px; margin-top: 8px; }
.article-row h2 a, .article-row h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.article-row:hover h2, .article-row:hover h3 { text-decoration: underline; text-underline-offset: .22em; }
.article-row p { max-width: 74ch; margin-top: 12px; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; }
.row-arrow { display: none; }
.search-label { display: block; margin-bottom: 8px; font-weight: 650; }
#article-search {
  display: block; width: min(100%, 560px); min-height: 48px; padding: 9px 12px;
  border: 1px solid var(--control); background: #fff; color: var(--ink);
}
.result-count { margin-block: 12px 20px; color: var(--muted); font-size: 14px; }
.empty-state { padding-block: 28px; border-top: 1px solid var(--line); color: var(--muted); }
.text-link, .case-links a, .case-screen figcaption a {
  display: inline-flex; align-items: center; min-height: 44px;
}

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; padding-top: 20px; color: var(--muted); font-size: 14px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.case-head { padding-block: 28px 32px; }
.case-head > .card-actions { margin-top: 24px; padding-top: 0; }
.case-title { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.case-title h1 { max-width: 30ch; }
.case-title .status-badge { align-self: center; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.trial-notice {
  max-width: 78ch; margin-top: 16px; padding-left: 12px;
  border-left: 3px solid var(--accent); color: var(--muted); font-size: 14px;
}
.case-screen { margin-block: 0 44px; }
.case-screen img { width: 100%; height: auto; border: 1px solid var(--line); }
.case-screen figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 14px; }
.case-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; padding-bottom: 64px; }
.case-facts { align-self: start; }
.case-facts dl { margin: 0; }
.case-facts dt { margin-top: 24px; color: var(--muted); font-size: 14px; }
.case-facts dt:first-child { margin-top: 0; }
.case-facts dd { margin: 4px 0 0; }
.case-facts dd a { display: inline-flex; align-items: center; min-height: 44px; }
.prose { max-width: 800px; font-size: 16px; line-height: 1.9; }
.prose section + section { margin-top: 44px; }
.prose h2 { margin-bottom: 16px; font-size: 24px; }
.prose h3 { margin-block: 24px 12px; font-size: 20px; }
.prose p + p { margin-top: 16px; }
.prose ul, .prose ol { margin-block: 12px 0; padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose a { text-decoration: underline; }
.tech-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 20px; }
.tech-table th, .tech-table td { padding: 12px 16px; border-block: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.tech-table th { background: #f5f7f8; font-weight: 650; }
.tech-table th:first-child, .tech-table td:first-child { width: 32%; }
.verification-list { padding-left: 24px; }
.case-links { margin-top: 20px; }

.article-head { padding-top: 28px; }
.article-head h1 { max-width: 30ch; margin-top: 16px; }
.author-line { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.article-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; padding-block: 40px 64px; }
.toc { align-self: start; position: sticky; top: 24px; border-top: 1px solid var(--line); }
.toc a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; font-size: 14px; }
.article-prose section h2 { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.article-prose p > a[href^="https:"] { display: inline-flex; align-items: center; min-height: 44px; }
.article-end { margin-block: 32px 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.about-section, .process-section { padding-block: 24px 48px; border-top: 1px solid var(--line); }
.about-section h2, .process-section h2 { margin-bottom: 16px; }
.about-section p, .process-section p { max-width: 74ch; }
.about-section p + p, .process-section p + p { margin-top: 16px; }
.contact-section { margin-top: 40px; padding-block: 36px 24px; border-top: 1px solid var(--line); }
.contact-section h2 { margin-bottom: 12px; }
.contact-section p { max-width: 72ch; margin-bottom: 12px; }
.contact-email { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; font-size: 18px; overflow-wrap: anywhere; }
.footer { padding-block: 20px 28px; color: var(--muted); font-size: 14px; }
.footer small { font-size: inherit; }
.error-page { padding-block: 52px 64px; }
.error-page h1 { margin-bottom: 16px; }
.error-page .button { margin-top: 24px; }

@media (max-width: 899px) {
  .project-grid, .archive-list { grid-template-columns: minmax(0, 1fr); }
  .case-body, .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .case-facts { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .case-facts dl { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); gap: 12px 20px; }
  .case-facts dl > * { min-width: 0; margin: 0; }
  .toc { position: static; display: flex; flex-wrap: wrap; column-gap: 24px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 80px; padding-block: 14px; gap: 16px; }
  .desktop-nav { display: none; }
  .site-menu { display: block; }
  .wordmark { font-size: 26px; }
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .page-intro { padding-block: 32px 28px; }
  .lead { margin-top: 12px; font-size: 16px; }
  .work-section { padding-bottom: 40px; }
  .section-heading { margin-bottom: 20px; }
  .project-grid { gap: 24px; }
  .project-card { padding: 18px; gap: 16px; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card-head h3 { font-size: 22px; }
  .card-actions { gap: 10px; }
  .button { padding-inline: 14px; }
  .archive-section { padding-block: 28px 32px; }
  .article-row h2, .article-row h3 { font-size: 20px; }
  .journal-list, .journal-section { padding-bottom: 36px; }
  .case-head { padding-block: 20px 24px; }
  .case-head > .card-actions { margin-top: 20px; }
  .case-title { flex-direction: column; align-items: flex-start; gap: 12px; }
  .case-title .status-badge { align-self: flex-start; }
  .case-actions { margin-top: 20px; }
  .case-screen { margin-bottom: 32px; }
  .case-body, .article-layout { padding-bottom: 40px; gap: 28px; }
  .case-facts dl { grid-template-columns: minmax(72px, 96px) minmax(0, 1fr); gap: 12px 16px; }
  .prose h2 { font-size: 22px; }
  .prose section + section { margin-top: 32px; }
  .tech-table { font-size: 14px; }
  .tech-table th, .tech-table td { padding: 10px; }
  .tech-table th:first-child, .tech-table td:first-child { width: 34%; }
  .article-head h1 { font-size: 28px; }
  .article-layout { padding-top: 28px; }
  .about-section, .process-section { padding-block: 24px 36px; }
  .contact-section { margin-top: 28px; padding-top: 28px; }
  .contact-email { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
