@import url("/meril-fonts.css");

:root {
  --page: #fff;
  --surface: #fff;
  --heading: #15233b;
  --body: #15233b;
  --muted: #5c6a7f;
  --link: #02368c;
  --line: #dedede;
  --accent: #4b4b4b;
  --accent-soft: #f4f4f4;
  --accent-hover: #e9e9e9;
  --radius: 8px;
  background: var(--page);
  color: var(--body);
  font-family: "Noto Sans JP Variable", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
input,button { font-family: inherit; }
h1,h2,h3 { color: var(--heading); }
a:hover { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-header { max-width: 1184px; padding: 20px 32px; border-bottom: 1px solid var(--line); }
.brand > img { width: 196px; }
.brand span { color: var(--muted); white-space: normal; }
.site-header nav { gap: 16px; }
.site-header nav a { padding: 8px 0; }
.home-layout { width: min(100% - 64px,1120px); margin: 32px auto 80px; }
.feature {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: start;
  min-height: clamp(440px,42vw,680px);
  padding: clamp(44px,6vw,88px) max(32px, calc((100% - 1120px) / 2));
  background: #15233b;
  color: #fff;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, rgb(10 22 42 / .84), rgb(10 22 42 / .64) 34%, transparent 74%);
}
.feature-copy { min-width: 0; }
.feature-copy .eyebrow { color: inherit; font-family: "Geist Variable", sans-serif; letter-spacing: .16em; font-weight: 700; }
.feature-copy h1 { margin: 12px 0 16px; color: inherit; font-size: clamp(27px,3.6vw,44px); line-height: 1.35; text-wrap: balance; }
.feature-copy p { margin: 0; }
.feature img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 72%;
}
.feature-button {
  display: inline-flex;
  gap: 12px;
  margin-top: 24px;
  padding: 8px 16px;
  background: #fff;
  color: var(--heading);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 700;
}
.feature-button:hover { background: var(--accent-soft); color: var(--link); }
.feature-button:focus-visible { outline-color: #fff; }
.home-topics,.home-latest { margin-top: clamp(40px,6vw,72px); }
.home-topics h2,.archive-topics h2 { margin: 0 0 12px; font-size: 1.125rem; }
.section { max-width: 1184px; }
.section-heading a,.breadcrumbs a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.archive-topics { margin: 0 0 28px; }
.category-description { margin: -8px 0 24px; }
.category-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.home-topics .category-links { padding: 0; list-style: none; }
.category-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
}
.category-links a:hover,.category-links a[aria-current] { color: var(--link); background: var(--accent-soft); }
.category-tree { list-style: none; margin: 0; padding: 0; }
.category-tree:not(.category-tree .category-tree) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.category-tree:not(.category-tree .category-tree) > li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.category-tree .category-tree {
  margin-inline-start: 4px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--line);
}
.category-tree a { display: inline-block; padding: 6px 0; }
.category-tree > li > a { font-weight: 700; }
.category-tree .category-tree a { font-weight: 400; }
.category-tree a:hover { text-decoration: underline; }
.cards { gap: 20px; }
.card { border-color: var(--line); border-radius: var(--radius); background: var(--surface); }
.card:hover,.card:focus-within { border-color: var(--accent); }
.card > a { display: flex; flex-direction: column; height: 100%; }
.card > a:focus-visible { outline-offset: -2px; }
.card img { aspect-ratio: 16 / 10; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 16px; }
.card h2,.card h3 { font-size: 1rem; margin: 4px 0 12px; overflow-wrap: anywhere; }
.card a:hover :is(h2,h3) { color: var(--link); }
.card small,.card time,.breadcrumbs,.article-meta,.section-heading span,.prose figcaption { color: var(--muted); }
.card time { margin-top: auto; font-variant-numeric: tabular-nums; }
.article-shell { max-width: 784px; }
.article-shell h1 { overflow-wrap: anywhere; margin-bottom: 16px; }
.article-cover { border-radius: var(--radius); }
.prose { color: var(--body); font-size: 1.0625rem; line-height: 2; }
.prose p { margin-block: 1.4em; }
.prose h2 {
  margin-block: 2.4em 1em;
  padding: .65em .85em;
  border: 0;
  border-inline-start: 4px solid var(--accent);
  background: var(--accent-soft);
  font-size: clamp(1.25rem,2.4vw,1.5625rem);
  line-height: 1.6;
}
.prose h3 {
  margin-block: 2em .9em;
  padding-bottom: .45em;
  border-bottom: 1px solid var(--line);
  line-height: 1.65;
}
.prose a { color: var(--link); text-underline-offset: 4px; }
.prose td,.prose th { border-color: var(--line); }
.prose th,.prose blockquote { background: var(--accent-soft); }
.prose blockquote { border-color: var(--line); }
.transport-archive {
  margin-block: 2em;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.transport-archive summary { cursor: pointer; font-weight: 700; }
.related-section { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-section > h2 { margin: 0 0 16px; }
.related-section .cards { gap: 12px; }
.related-link-group { margin-top: 24px; }
.related-link-group h3 { margin: 0 0 8px; font-size: 1rem; }
.pagination a { border-color: var(--line); border-radius: 6px; }
footer { background: var(--surface); border-top: 1px solid var(--line); }
@media(max-width:700px) {
  .prose { font-size: 1rem; }
  .site-header { padding: 16px 20px; }
  .site-header nav { margin-top: 8px; gap: 12px; }
  .home-layout { width: calc(100% - 40px); margin: 24px auto 56px; }
  .feature { min-height: 450px; padding: 36px 24px; }
  .feature::before {
    background: linear-gradient(180deg, rgb(10 22 42 / .88), rgb(10 22 42 / .73) 45%, transparent 82%);
  }
  .feature img { object-position: 33% center; }
  .cards { gap: 12px; }
  .card-body { padding: 12px; }
  .card h2,.card h3 { font-size: .9rem; }
  .related-section .cards { grid-template-columns: 1fr; }
  .related-section .card > a { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; }
  .related-section .card > a:has(img) { grid-template-columns: 104px minmax(0,1fr); align-items: center; }
  .related-section .card img { align-self: stretch; height: 100%; }
}
@media(max-width:380px) {
  .home-latest .cards,.section > .cards { grid-template-columns: 1fr; }
}
