@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Shippori+Mincho:wght@400;500;700;800&display=swap');

:root { --font-mincho: 'Shippori Mincho'; --font-sans: 'Noto Sans JP'; }

:root {
  --linen: #efe9dd;
  --linen-deep: #e6dccb;
  --paper: #faf6ee;
  --ink: #2a2a28;
  --ink-soft: #57544c;
  --muted: #8d887b;
  --line: #ddd3c0;
  --line-soft: #e7ddcd;
  --indigo: #42537a;
  --indigo-deep: #33415f;
  --indigo-soft: #e5e8f0;
  --indigo-tint: #eef0f6;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 16px 40px rgba(51, 65, 95, 0.12);
  --shadow-soft: 0 8px 22px rgba(51, 65, 95, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  /* Woven linen texture over the linen-beige base */
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(90deg, rgba(42, 42, 40, 0.022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(42, 42, 40, 0.022) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 14% -10%, rgba(66, 83, 122, 0.07), transparent 32rem);
  color: var(--ink);
  font-family: var(--font-sans), ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--indigo-deep);
  color: var(--paper);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-mincho), "Hiragino Mincho ProN", serif;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--indigo);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow .gate-glyph {
  width: 20px;
  height: 20px;
}

.kicker {
  margin: 0;
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ---------- Masthead (gate header) ---------- */
.masthead {
  background: linear-gradient(180deg, rgba(250, 246, 238, 0.92), rgba(250, 246, 238, 0.5));
  border-top: 3px solid var(--indigo);
  box-shadow: inset 0 -1px 0 var(--line);
}

.masthead-inner {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.wordmark-gate {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--indigo-soft);
  border-top: 2px solid var(--indigo);
  border-radius: var(--radius);
  background: var(--indigo-tint);
  color: var(--indigo-deep);
}

.wordmark-text strong {
  display: block;
  font-family: var(--font-mincho), serif;
  font-size: 1.34rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.wordmark-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.masthead-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.masthead-nav a {
  position: relative;
  padding-bottom: 3px;
}

.masthead-nav a:hover {
  color: var(--indigo-deep);
  border-bottom: 1px solid var(--indigo);
}

main {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Lead (asymmetric gate entry) ---------- */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 62px 0 50px;
}

.lead h1 {
  font-size: clamp(1.7rem, 3.1vw, 2.7rem);
  line-height: 1.5;
}

.lead-lede {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.95;
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.lead-tags span {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.83rem;
  font-weight: 500;
}

/* Tall gateway panel: jpg layered OVER an indigo gradient fallback */
.lead-gate {
  position: relative;
  min-height: clamp(280px, 38vw, 420px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(51, 65, 95, 0.34), rgba(42, 42, 40, 0.5)),
    url("/images/linengate-lead.jpg") center / cover no-repeat,
    linear-gradient(160deg, #4a5b84 0%, #3a4767 55%, #2f3a55 100%);
  box-shadow: var(--shadow);
}

/* Inner gate frame */
.lead-gate::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(250, 246, 238, 0.5);
  border-top-width: 3px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.lead-gate-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--paper);
}

.lead-gate-mark .gate-glyph {
  width: 56px;
  height: 56px;
}

.lead-gate-caption {
  font-family: var(--font-mincho), serif;
  font-size: 1.04rem;
  letter-spacing: 0.16em;
}

/* ---------- Section heading ---------- */
.band-heading {
  margin-bottom: 26px;
}

.band-heading h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
}

.band-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.gates,
.recent,
.about {
  padding: 54px 0;
}

/* ---------- Entry-gate cards (signature) ---------- */
.gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--indigo);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gate-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gate-card-lintel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.gate-card-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--indigo);
}

.gate-card-mark .gate-glyph {
  width: 24px;
  height: 24px;
}

.gate-card-situation {
  color: var(--indigo-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gate-card h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}

.gate-card-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.74;
  font-size: 0.96rem;
}

.gate-points {
  list-style: none;
  margin: 16px 0 18px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.gate-points li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.62;
  font-size: 0.95rem;
}

/* Gate-post marker: a slim indigo vertical bar */
.gate-points li::before,
.article-content ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 2px;
  height: 0.78em;
  background: var(--indigo);
  border-radius: 1px;
}

.gate-count {
  display: inline-block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- 確認ポイント band (signature) ---------- */
.points {
  margin: 12px 0;
  padding: 44px;
  background: var(--indigo-tint);
  border: 1px solid var(--indigo-soft);
  border-left: 3px solid var(--indigo);
  border-radius: var(--radius);
}

.points-head {
  max-width: 640px;
  margin-bottom: 26px;
}

.points-head h2 {
  margin: 10px 0 0;
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
}

.points-sub {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.85;
}

.point-list {
  list-style: none;
  counter-reset: point;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.point-list li {
  counter-increment: point;
  position: relative;
  padding: 16px 18px 16px 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.6;
}

.point-list li::before {
  content: counter(point);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--paper);
  font-family: var(--font-mincho), serif;
  font-size: 0.92rem;
  font-weight: 700;
}

/* ---------- Recent entries (list) ---------- */
.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.entry-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.entry-row:hover {
  background: var(--paper);
}

.entry-date {
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.entry-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-chip {
  align-self: flex-start;
  color: var(--indigo-deep);
  background: var(--indigo-soft);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.entry-body strong {
  font-family: var(--font-mincho), serif;
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.entry-desc {
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.66;
}

.entry-arrow {
  color: var(--indigo);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- About ---------- */
.about h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.8rem);
  margin-bottom: 20px;
}

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
  max-width: 780px;
}

.about-list li {
  position: relative;
  padding: 17px 20px 17px 48px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  line-height: 1.78;
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 21px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--indigo);
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--indigo);
  background: linear-gradient(180deg, transparent, rgba(66, 83, 122, 0.05));
}

.footer-inner {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 56px;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-gate {
  width: 38px;
  height: 38px;
}

.footer-gate .gate-glyph {
  width: 20px;
  height: 20px;
}

.footer-brand strong {
  font-family: var(--font-mincho), serif;
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.footer-desc {
  margin: 14px 0 16px;
  max-width: 520px;
  line-height: 1.74;
  font-size: 0.9rem;
}

.footer-disclosure {
  display: inline-block;
  margin: 0;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo-deep);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Article (single column) ---------- */
.article-shell {
  max-width: 760px;
  padding: 34px 0 80px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--indigo-deep);
}

.article-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--indigo);
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 52px);
  box-shadow: var(--shadow-soft);
}

.article-chip {
  display: inline-block;
  color: var(--indigo-deep);
  background: var(--indigo-soft);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
}

.article-head h1 {
  margin: 16px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.5;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Intro note (入口メモ): indigo double-rule, distinct from a filled box */
.intro-note {
  margin: 28px 0 8px;
  padding: 6px 0 6px 22px;
  border-left: 2px double var(--indigo);
}

.intro-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.intro-note p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mincho), serif;
  font-size: 1.08rem;
  line-height: 1.95;
}

.article-content {
  margin-top: 30px;
  color: #34322d;
  font-size: 1.04rem;
  line-height: 1.95;
}

.article-content h2 {
  margin: 44px 0 16px;
  padding-left: 14px;
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  border-left: 4px solid var(--indigo);
}

.article-content h3 {
  margin: 30px 0 12px;
  font-size: 1.18rem;
}

.article-content p {
  margin: 0 0 18px;
}

.article-content a {
  color: var(--indigo-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--indigo);
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--indigo);
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.article-content ul li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  line-height: 1.78;
}

.article-content ol {
  counter-reset: ac;
}

.article-content ol li {
  position: relative;
  padding-left: 28px;
  counter-increment: ac;
  color: var(--ink-soft);
  line-height: 1.78;
}

.article-content ol li::before {
  content: counter(ac) ".";
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--indigo);
  font-family: var(--font-mincho), serif;
  font-weight: 700;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--indigo);
  background: var(--indigo-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--indigo-deep);
  font-family: var(--font-mincho), serif;
  font-size: 1.16rem;
  line-height: 1.85;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
}

.article-content th:last-child,
.article-content td:last-child {
  border-right: 0;
}

.article-content tbody tr:last-child td {
  border-bottom: 0;
}

.article-content th {
  background: var(--indigo);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.article-content tbody tr:nth-child(even) {
  background: rgba(66, 83, 122, 0.04);
}

.faq-section,
.source-note {
  margin-top: 40px;
}

.faq-section h2,
.source-note h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  margin-bottom: 10px;
}

.faq-section details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  gap: 10px;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::before {
  content: "問";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: var(--radius-sm);
  background: var(--indigo-soft);
  color: var(--indigo-deep);
  font-family: var(--font-mincho), serif;
  font-size: 0.78em;
}

.faq-section details p,
.source-note p {
  color: var(--ink-soft);
  line-height: 1.85;
}

.faq-section details p {
  margin: 12px 0 0 2.1em;
}

.source-note {
  padding: 22px 24px;
  background: var(--linen);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.article-foot {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--indigo-deep);
  font-weight: 700;
}

.back-link::before {
  content: "←";
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .lead {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 0 36px;
  }

  .gate-grid {
    grid-template-columns: 1fr;
  }

  .point-list {
    grid-template-columns: 1fr;
  }

  .points {
    padding: 30px;
  }
}

@media (max-width: 560px) {
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .masthead-nav {
    gap: 14px 20px;
  }

  .entry-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entry-arrow {
    display: none;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
