/* となりで眠れない — design system
   One accent (deep teal), warm neutrals, hex notation throughout.
   Type: Noto Sans JP. Body line-height 1.85 (Japanese long-form).
   Radius: lg 20 / md 16 / sm 10. Shadows: layered transparent black only. */

:root {
  --accent-700: #0f766e;
  --accent-600: #0d9488;
  --accent-500: #14b8a6;
  --accent-100: #c9f2ea;
  --accent-50: #e7f8f3;
  --ink-900: #2b2622;
  --ink-700: #45403a;
  --ink-500: #7a736a;
  --line: #e7e1d9;
  --bg: #ffffff;
  --bg-soft: #faf7f2;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-card: 0 1px 2px oklch(0 0 0 / 0.05), 0 10px 28px oklch(0 0 0 / 0.07);
  --header-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-700);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

a { color: var(--accent-700); }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  font-weight: 900;
  font-size: 1.125rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.logo svg {
  color: #fff;
  background: var(--accent-600);
  border-radius: 10px;
  padding: 5px;
  box-sizing: content-box;
  flex: none;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--ink-700);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 2px;
}
@media (hover: hover) {
  .site-nav a:hover { color: var(--accent-700); }
}

/* ---------- hero ---------- */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero h1 {
  margin: 0 0 16px;
  color: var(--ink-900);
  font-size: 2.125rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.hero .lead { margin: 0 0 24px; font-size: 1.0625rem; }
.hero-fact {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 2px;
  background: var(--bg);
  border: 2px solid var(--accent-100);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-size: 0.9375rem;
  box-shadow: var(--shadow-card);
  transform: rotate(-1.2deg);
}
.hero-fact strong {
  color: var(--accent-600);
  font-size: 1.375rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hero-fact span:last-child {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--ink-500);
}
.hero-photo {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.07) brightness(1.02);
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section-head { margin-bottom: 32px; }
.section-head h2 {
  margin: 0 0 8px;
  color: var(--ink-900);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.4;
}
.section-head h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-500);
  margin-bottom: 14px;
}
.section-head p { margin: 0; color: var(--ink-500); font-size: 0.9375rem; }

/* ---------- situation entries ---------- */
.entry-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  margin-bottom: 16px;
}
.entry-main figure { margin: 0; }
.entry-main figure img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  outline: none;
  filter: saturate(1.07) brightness(1.02);
}
.entry-main .entry-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.entry-tag {
  align-self: flex-start;
  background: var(--accent-100);
  color: var(--accent-700);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}
.entry-main h3 {
  margin: 0;
  color: var(--ink-900);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.45;
}
.entry-main p { margin: 0; font-size: 0.9375rem; }
.entry-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-700);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-top: 8px;
}
.entry-more svg { transition: transform 150ms ease-out; }

.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list li { border-top: 1px solid var(--line); }
.entry-list li:last-child { border-bottom: 1px solid var(--line); }
.entry-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 8px;
  text-decoration: none;
}
.entry-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-100);
  color: var(--accent-700);
  display: grid;
  place-items: center;
}
.entry-row h3 {
  margin: 0 0 2px;
  color: var(--ink-900);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
}
.entry-row p { margin: 0; font-size: 0.875rem; color: var(--ink-500); line-height: 1.6; }
.entry-row .entry-arrow { margin-left: auto; flex: none; color: var(--accent-700); }

@media (hover: hover) {
  a.entry-main, a.article-card { transition: transform 150ms ease-out, box-shadow 150ms ease-out; }
  a.entry-main:hover, a.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
  a.entry-main:hover .entry-more svg, a.article-card:hover .entry-more svg { transform: translateX(3px); }
  .entry-row { transition: background-color 150ms ease-out; }
  .entry-row:hover { background: var(--accent-50); }
  .entry-row:hover .entry-arrow { transform: translateX(3px); }
  .entry-row .entry-arrow { transition: transform 150ms ease-out; }
  .photo-zoom img { transition: transform 300ms ease-out; }
  .photo-zoom:hover img { transform: scale(1.02); }
}
a.entry-main:active, a.article-card:active, .btn:active { transform: scale(0.96); }

/* ---------- article cards ---------- */
.article-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
}
.article-card figure { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; }
.article-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: none;
  filter: saturate(1.07) brightness(1.02);
}
.article-card .card-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.article-card h3 {
  margin: 0;
  color: var(--ink-900);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  text-wrap: pretty;
}
.article-card p { margin: 0; font-size: 0.9375rem; flex: 1; }

/* ---------- cost band ---------- */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cost-item {
  background: var(--bg);
  border: 2px solid var(--accent-100);
  border-top: 6px solid var(--accent-500);
  border-radius: var(--r-md);
  padding: 24px;
}
.cost-item .cost-name { font-weight: 700; color: var(--ink-900); margin: 0 0 6px; }
.cost-item .cost-price {
  margin: 0;
  color: var(--accent-600);
  font-size: 1.625rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.cost-item .cost-price small { font-size: 0.875rem; font-weight: 500; }
.cost-item .cost-note { margin: 6px 0 0; font-size: 0.8125rem; color: var(--ink-500); line-height: 1.6; }
.cost-foot { margin: 20px 0 0; font-size: 0.875rem; color: var(--ink-500); }

/* ---------- categories ---------- */
.cat-list { display: flex; flex-direction: column; }
.cat-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.cat-row:last-child { border-bottom: 1px solid var(--line); }
.cat-row--text { grid-template-columns: 1fr; }
.cat-row figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
}
.cat-row figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.07) brightness(1.02);
}
.cat-row h3 {
  margin: 0 0 6px;
  color: var(--ink-900);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.5;
}
.cat-row p { margin: 0; font-size: 0.9375rem; max-width: 40em; }
.cat-status {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink-500);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 2px 12px;
  border-radius: 999px;
}
a.cat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
a.cat-link svg { transition: transform 150ms ease-out; }
@media (hover: hover) { a.cat-link:hover svg { transform: translateX(3px); } }

/* ---------- stance band ---------- */
.stance {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.stance figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stance figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.07) brightness(1.02);
}
.stance h2 {
  margin: 0 0 16px;
  color: var(--ink-900);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.4;
}
.stance p { margin: 0 0 12px; }
.stance p:last-child { margin-bottom: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 150ms ease-out, background-color 150ms ease-out;
}
@media (hover: hover) { .btn:hover { background: var(--accent-700); } }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 48px 0 40px;
  margin-top: 0;
}
.site-footer .foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer nav a {
  color: var(--ink-700);
  font-size: 0.875rem;
  text-decoration: none;
}
.site-footer .foot-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-500);
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* ---------- article pages ---------- */
.article-wrap { max-width: 760px; margin-inline: auto; padding-inline: 20px; }
.article-head { padding: 48px 0 0; }
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin: 0 0 20px;
}
.breadcrumb a { color: var(--ink-500); text-decoration: none; }
.article-head h1 {
  margin: 0 0 16px;
  color: var(--ink-900);
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 1.45;
  text-wrap: pretty;
}
.article-lead { margin: 0 0 28px; font-size: 1.0625rem; }
.article-hero {
  margin: 0 0 40px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.07) brightness(1.02);
}
.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 28px;
  margin-bottom: 48px;
}
.toc p {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--ink-900);
  font-size: 0.9375rem;
}
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 4px 0; font-size: 0.9375rem; line-height: 1.6; }
.toc a { color: var(--ink-700); text-decoration: none; }
@media (hover: hover) { .toc a:hover { color: var(--accent-700); text-decoration: underline; } }

.prose { padding-bottom: 8px; }
.prose h2 {
  margin: 52px 0 18px;
  color: var(--ink-900);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.45;
  background: var(--accent-50);
  border-radius: var(--r-sm);
  padding: 14px 18px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin: 40px 0 14px;
  color: var(--ink-900);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.5;
  border-inline-start: 4px solid var(--accent-600);
  padding-inline-start: 12px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose p { margin: 0 0 18px; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.5em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--accent-600); font-weight: 700; }
.prose blockquote {
  margin: 24px 0;
  background: var(--accent-50);
  border-inline-start: 4px solid var(--accent-600);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 20px 24px;
}
.prose blockquote p { margin: 0; font-size: 1.0625rem; }
.prose .note {
  font-size: 0.875rem;
  color: var(--ink-500);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 44px;
}
.prose .source { font-size: 0.8125rem; color: var(--ink-500); margin-top: -8px; }

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overscroll-behavior: contain;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.prose th, .prose td {
  padding: 13px 16px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose thead th {
  background: var(--accent-50);
  color: var(--ink-900);
  font-weight: 700;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose td.num, .prose td.price {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* PR placeholder + related */
.pr-box {
  margin: 48px 0 0;
  border: 1.5px dashed var(--ink-500);
  border-radius: var(--r-md);
  padding: 22px 26px;
  color: var(--ink-500);
  font-size: 0.875rem;
  line-height: 1.7;
}
.pr-box .pr-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--ink-500);
  border-radius: 4px;
  padding: 0 8px;
  margin-bottom: 8px;
}
.pr-box p { margin: 0; }
.related { margin: 40px 0 72px; }
.related h2 {
  font-size: 1.125rem;
  color: var(--ink-900);
  margin: 0 0 16px;
  font-weight: 700;
}

/* ---------- about page ---------- */
.page-head { padding: 56px 0 0; }
.page-head h1 {
  margin: 0 0 12px;
  color: var(--ink-900);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.45;
}
.info-table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 0.9375rem; }
.info-table th, .info-table td {
  border: 1px solid var(--line);
  padding: 13px 16px;
  text-align: start;
  vertical-align: top;
  line-height: 1.65;
}
.info-table th {
  background: var(--bg-soft);
  color: var(--ink-900);
  font-weight: 700;
  width: 30%;
  white-space: nowrap;
}

/* ---------- entrance motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] {
    opacity: 0;
    animation: enter 300ms ease-out forwards;
  }
  [data-enter="2"] { animation-delay: 100ms; }
  [data-enter="3"] { animation-delay: 200ms; }
  @keyframes enter {
    from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 40px; }
  .hero-photo { order: -1; aspect-ratio: 16 / 9; }
  .stance { grid-template-columns: 1fr; gap: 28px; }
  .cost-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .logo { font-size: 1rem; }
  .section { padding: 52px 0; }
  .hero h1 { font-size: 1.625rem; }
  .entry-main { grid-template-columns: 1fr; }
  .entry-main figure { aspect-ratio: 16 / 9; }
  .entry-main figure img { min-height: 0; }
  .entry-main .entry-body { padding: 24px; }
  .entry-row { gap: 14px; padding: 18px 4px; }
  .entry-icon { width: 44px; height: 44px; }
  .article-cards { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .cat-row figure { aspect-ratio: 16 / 9; }
  .article-head h1, .page-head h1 { font-size: 1.5rem; }
  .prose h2 { font-size: 1.25rem; }
  .info-table th { width: 34%; }
}
