/* ================================================
   dumppp Content Pages — content.css
   Roadmap / Changelog / Manifesto 共通スタイル
   BEM + CSS Custom Properties, legal.css design tokens共有
   ================================================ */

/* --- Design Tokens (legal.css と共有) --- */
:root {
  --color-accent: #E16259;
  --color-accent-hover: #c94e46;
  --color-bg: #ffffff;
  --color-surface: #f9fafb;
  --color-text: #0f172a;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-header-bg: rgba(255,255,255,.8);
  --color-selection-bg: #E16259;
  --color-selection-text: #ffffff;
  --color-strong: #1e293b;
  --font-family: 'Inter', sans-serif;
  --max-width: 1280px;
  --header-height: 80px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #050505;
    --color-surface: #121212;
    --color-text: #f1f5f9;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    --color-border: #1f2937;
    --color-border-light: rgba(31,41,55,.5);
    --color-header-bg: rgba(5,5,5,.8);
    --color-strong: #e2e8f0;
  }
}

/* --- FOUC Prevention --- */
html { visibility: hidden; }
html.fonts-loaded { visibility: visible; }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--color-selection-bg); color: var(--color-selection-text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== Layout ========== */
.content-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content-page__wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== Header ========== */
.content-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: var(--color-header-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,.5);
}
@media (prefers-color-scheme: dark) {
  .content-header { border-bottom-color: rgba(31,41,55,.5); }
}

.content-header__container {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
}
@media (min-width: 1024px) {
  .content-header__container { padding: 0 2rem; }
}

.content-header__logo {
  display: flex; align-items: center;
  transition: opacity .2s;
}
.content-header__logo:hover { opacity: .8; }
.content-header__logo-img { height: 32px; width: auto; }
.content-header__nav { display: flex; align-items: center; gap: 1rem; }

/* ========== Main Content ========== */
.content-main {
  flex-grow: 1;
  padding: calc(var(--header-height) + 3rem) 0 6rem;
}

.content-main__container {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .content-main__container { padding: 0 2rem; }
}

.content-main__content { max-width: 48rem; margin: 0 auto; }

.content-heading {
  font-size: 2.25rem; font-weight: 900;
  margin-bottom: 1rem; color: var(--color-text);
}
@media (min-width: 768px) {
  .content-heading { font-size: 3rem; }
}
.content-heading__subtitle {
  display: block;
  font-size: 1.25rem; font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: .375rem;
}
@media (min-width: 768px) {
  .content-heading__subtitle { font-size: 1.5rem; }
}

.content-description {
  color: var(--color-text-secondary);
  line-height: 1.75; margin-bottom: 2.5rem;
}

/* ========== Breadcrumb ========== */
.content-breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 2rem; font-size: .875rem;
  color: var(--color-text-muted);
}
.content-breadcrumb a {
  color: var(--color-text-secondary); transition: color .2s;
}
.content-breadcrumb a:hover { color: var(--color-accent); }
.content-breadcrumb span {
  color: var(--color-text); font-weight: 600;
}
.content-breadcrumb a + a::before,
.content-breadcrumb a + span::before {
  content: ''; /* separator handled by " / " in HTML */
}

/* ========== Content Entries (List grid) ========== */
.content-entries {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .content-entries { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .content-entries { grid-template-columns: repeat(3, 1fr); }
}

/* ========== Content List (release notes) ========== */
.content-list {
  display: flex; flex-direction: column; gap: 0;
}
.content-list-item {
  display: flex; flex-direction: column; gap: .375rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: background .15s;
}
.content-list-item:first-child { border-top: 1px solid var(--color-border); }
.content-list-item:hover { background: var(--color-surface); }
@media (prefers-color-scheme: dark) {
  .content-list-item:hover { background: rgba(255,255,255,.03); }
}
.content-list-item__header {
  display: flex; align-items: center; gap: .625rem;
}
.content-list-item__badge {
  display: inline-flex; align-items: center;
  padding: .125rem .5rem; border-radius: 9999px;
  font-size: .6875rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}
.content-list-item__badge--feature { background: #d1fae5; color: #047857; }
.content-list-item__badge--bugfix { background: #fef3c7; color: #b45309; }
.content-list-item__badge--improvement { background: #dbeafe; color: #1d4ed8; }
.content-list-item__badge--breaking { background: #fee2e2; color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .content-list-item__badge--feature { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .content-list-item__badge--bugfix { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-list-item__badge--improvement { background: rgba(59,130,246,.2); color: #93c5fd; }
  .content-list-item__badge--breaking { background: rgba(239,68,68,.2); color: #fca5a5; }
}
.content-list-item__date {
  font-size: .75rem; color: var(--color-text-muted);
}
.content-list-item__title {
  font-size: 1rem; font-weight: 600;
  color: var(--color-text); line-height: 1.4;
}
.content-list-item__summary {
  font-size: .8125rem; color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ========== Content Card (list items) ========== */
.content-card {
  display: flex; flex-direction: column; gap: .5rem;
  border: 1px solid var(--color-border);
  border-radius: .75rem; padding: 1.25rem;
  background: var(--color-bg);
  transition: border-color .2s, box-shadow .2s;
}
.content-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(225,98,89,.08);
}
@media (prefers-color-scheme: dark) {
  .content-card { background: var(--color-surface); }
  .content-card:hover { box-shadow: 0 4px 12px rgba(225,98,89,.15); }
}

.content-card__title {
  font-size: 1.125rem; font-weight: 700;
  color: var(--color-text); line-height: 1.4;
}

.content-card__summary {
  font-size: .875rem; color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.content-card__date {
  font-size: .8125rem; color: var(--color-text-muted);
}

.content-card__category,
.content-card__status,
.content-card__priority {
  display: inline-flex; align-items: center;
  padding: .125rem .5rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap; width: fit-content;
}

/* Category badges (release notes) */
.content-card__category--feature { background: #d1fae5; color: #047857; }
.content-card__category--bugfix { background: #fef3c7; color: #b45309; }
.content-card__category--improvement { background: #dbeafe; color: #1d4ed8; }
.content-card__category--breaking { background: #fee2e2; color: #b91c1c; }

/* Status badges (roadmap) */
.content-card__status--planned { background: #dbeafe; color: #1d4ed8; }
.content-card__status--in-progress { background: #fef3c7; color: #b45309; }
.content-card__status--completed { background: #d1fae5; color: #047857; }

/* Priority badges (roadmap) */
.content-card__priority--high { background: #fee2e2; color: #b91c1c; }
.content-card__priority--medium { background: #fef3c7; color: #b45309; }
.content-card__priority--low { background: #f3f4f6; color: #6b7280; }

@media (prefers-color-scheme: dark) {
  .content-card__category--feature { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .content-card__category--bugfix { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-card__category--improvement { background: rgba(59,130,246,.2); color: #93c5fd; }
  .content-card__category--breaking { background: rgba(239,68,68,.2); color: #fca5a5; }
  .content-card__status--planned { background: rgba(59,130,246,.2); color: #93c5fd; }
  .content-card__status--in-progress { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-card__status--completed { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .content-card__priority--high { background: rgba(239,68,68,.2); color: #fca5a5; }
  .content-card__priority--medium { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-card__priority--low { background: rgba(107,114,128,.2); color: #9ca3af; }
}

/* ========== Content Detail (single page) ========== */
.content-detail {}

.content-detail__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.content-detail__date {
  font-size: .875rem; color: var(--color-text-muted);
  margin-top: .5rem;
}

.content-detail__badges {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-top: .75rem;
}

.content-detail__badge {
  display: inline-flex; align-items: center;
  padding: .25rem .75rem; border-radius: 9999px;
  font-size: .8125rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap;
}

/* Detail badge variants (release notes) */
.content-detail__badge--feature { background: #d1fae5; color: #047857; }
.content-detail__badge--bugfix { background: #fef3c7; color: #b45309; }
.content-detail__badge--improvement { background: #dbeafe; color: #1d4ed8; }
.content-detail__badge--breaking { background: #fee2e2; color: #b91c1c; }

/* Detail badge variants (roadmap status) */
.content-detail__badge--planned { background: #dbeafe; color: #1d4ed8; }
.content-detail__badge--in-progress { background: #fef3c7; color: #b45309; }
.content-detail__badge--completed { background: #d1fae5; color: #047857; }

/* Detail badge variants (roadmap priority) */
.content-detail__badge--priority-high { background: #fee2e2; color: #b91c1c; }
.content-detail__badge--priority-medium { background: #fef3c7; color: #b45309; }
.content-detail__badge--priority-low { background: #f3f4f6; color: #6b7280; }

@media (prefers-color-scheme: dark) {
  .content-detail__badge--feature { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .content-detail__badge--bugfix { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-detail__badge--improvement { background: rgba(59,130,246,.2); color: #93c5fd; }
  .content-detail__badge--breaking { background: rgba(239,68,68,.2); color: #fca5a5; }
  .content-detail__badge--planned { background: rgba(59,130,246,.2); color: #93c5fd; }
  .content-detail__badge--in-progress { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-detail__badge--completed { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .content-detail__badge--priority-high { background: rgba(239,68,68,.2); color: #fca5a5; }
  .content-detail__badge--priority-medium { background: rgba(245,158,11,.2); color: #fcd34d; }
  .content-detail__badge--priority-low { background: rgba(107,114,128,.2); color: #9ca3af; }
}

/* Detail description (natural language overview) */
.content-detail__description {
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

/* Detail body (markdown/change list content) */
.content-detail__body {
  line-height: 1.75; color: var(--color-text-secondary);
  list-style: none;
}
.content-detail__body h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--color-text);
  margin: 2rem 0 .75rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--color-border-light);
}
.content-detail__body h3 {
  font-size: 1.25rem; font-weight: 600; color: var(--color-text);
  margin: 1.5rem 0 .5rem;
}
.content-detail__body p { margin-bottom: 1rem; }
.content-detail__body ul, .content-detail__body ol {
  padding-left: 1.5rem; margin-bottom: 1rem;
}
.content-detail__body > li { list-style: none; }
.content-detail__body a { color: var(--color-accent); transition: opacity .2s; }
.content-detail__body a:hover { text-decoration: underline; }
.content-detail__body code {
  background: var(--color-surface); padding: .125rem .375rem;
  border-radius: .25rem; font-size: .875rem;
}
.content-detail__body pre {
  background: var(--color-surface); padding: 1rem;
  border-radius: .5rem; overflow-x: auto;
  margin-bottom: 1rem; border: 1px solid var(--color-border-light);
}
.content-detail__body pre code { background: none; padding: 0; }
.content-detail__body strong { color: var(--color-strong); }
@media (prefers-color-scheme: dark) {
  .content-detail__body code { background: rgba(255,255,255,.06); }
  .content-detail__body pre { background: rgba(255,255,255,.04); border-color: var(--color-border); }
}

/* ========== Change Items (release notes changes) ========== */
.change-item {
  display: flex; align-items: flex-start; gap: .625rem;
  font-size: .9375rem; color: var(--color-text-secondary);
  line-height: 1.6; padding: .5rem 0;
  list-style: none;
}
.change-item + .change-item {
  border-top: 1px solid var(--color-border-light);
}

.change-item__badge {
  display: inline-flex; align-items: center;
  padding: .125rem .5rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 600; line-height: 1.5;
  white-space: nowrap; flex-shrink: 0; margin-top: .125rem;
}

.change-item--new .change-item__badge { background: #d1fae5; color: #047857; }
.change-item--improved .change-item__badge { background: #dbeafe; color: #1d4ed8; }
.change-item--fixed .change-item__badge { background: #fef3c7; color: #b45309; }
.change-item--removed .change-item__badge { background: #fee2e2; color: #b91c1c; }

@media (prefers-color-scheme: dark) {
  .change-item--new .change-item__badge { background: rgba(16,185,129,.2); color: #6ee7b7; }
  .change-item--improved .change-item__badge { background: rgba(59,130,246,.2); color: #93c5fd; }
  .change-item--fixed .change-item__badge { background: rgba(245,158,11,.2); color: #fcd34d; }
  .change-item--removed .change-item__badge { background: rgba(239,68,68,.2); color: #fca5a5; }
}

/* ========== Manifesto Content ========== */

.content-article__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.content-article__date {
  font-size: .875rem; color: var(--color-text-muted);
  margin-top: .5rem;
}

.content-article__body {
  line-height: 1.8; color: var(--color-text-secondary);
  font-size: 1.0625rem;
}
.content-article__body h2 {
  font-size: 1.75rem; font-weight: 800; color: var(--color-text);
  margin: 2.5rem 0 1rem;
}
.content-article__body h3 {
  font-size: 1.25rem; font-weight: 600; color: var(--color-text);
  margin: 1.5rem 0 .75rem;
}
.content-article__body p { margin-bottom: 1.25rem; }
.content-article__body blockquote {
  border-left: 3px solid var(--color-accent); padding-left: 1rem;
  margin: 1.5rem 0; color: var(--color-text-muted); font-style: italic;
}
.content-article__body strong { color: var(--color-strong); }
.content-article__body a { color: var(--color-accent); transition: opacity .2s; }
.content-article__body a:hover { text-decoration: underline; }
.content-article__body ul, .content-article__body ol {
  padding-left: 1.5rem; margin-bottom: 1rem;
}
.content-article__body li { padding: .25rem 0; }

/* ========== Language Banner (legal.css と同パターン) ========== */
.lang-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--color-accent); color: #fff; padding: .625rem 0;
}
.lang-banner--hidden { display: none; }
.lang-banner__container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; flex-wrap: wrap;
}
.lang-banner__text { font-size: .875rem; font-weight: 500; margin: 0; }
.lang-banner__yes {
  display: inline-block; padding: .25rem .875rem;
  font-size: .8125rem; font-weight: 600;
  border: 1.5px solid rgba(255,255,255,.7); border-radius: 9999px;
  color: #fff; background: transparent; transition: background .15s;
}
.lang-banner__yes:hover { background: rgba(255,255,255,.15); }
.lang-banner__no {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: .8125rem; font-weight: 500; cursor: pointer;
  padding: .25rem .5rem; transition: color .15s; font-family: inherit;
}
.lang-banner__no:hover { color: #fff; }
.lang-banner:not(.lang-banner--hidden) ~ .content-page__wrapper .content-header { top: 38px; }

/* ========== Language Switcher (legal.css と同パターン) ========== */
.lang-switcher { position: relative; display: flex; align-items: center; }
.lang-switcher__trigger {
  display: flex; align-items: center; gap: .25rem;
  background: none; border: none; padding: .375rem .5rem;
  font-size: .875rem; font-weight: 600;
  color: var(--color-text-secondary); border-radius: .5rem;
  transition: color .2s, background .2s; font-family: inherit;
}
.lang-switcher__trigger:hover { color: var(--color-accent); background: var(--color-surface); }
@media (prefers-color-scheme: dark) {
  .lang-switcher__trigger { color: #d1d5db; }
  .lang-switcher__trigger:hover { background: rgba(255,255,255,.05); }
}
.lang-switcher__current { font-size: .8125rem; }
.lang-switcher__arrow { font-size: 1.125rem; transition: transform .2s; }
.lang-switcher__trigger[aria-expanded="true"] .lang-switcher__arrow { transform: rotate(180deg); }
.lang-switcher__dropdown {
  position: absolute; top: calc(100% + .5rem); right: 0;
  min-width: 160px; max-height: 320px; overflow-y: auto;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: .75rem; box-shadow: 0 10px 25px rgba(0,0,0,.1);
  z-index: 50; padding: .375rem; animation: fadeIn .15s ease-out;
}
@media (prefers-color-scheme: dark) {
  .lang-switcher__dropdown {
    background: var(--color-surface); border-color: var(--color-border);
    box-shadow: 0 10px 25px rgba(0,0,0,.4);
  }
}
.lang-switcher__dropdown--hidden { display: none; }
.lang-switcher__item {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: .5rem;
  font-size: .875rem; color: var(--color-text);
  transition: background .15s; white-space: nowrap;
}
.lang-switcher__item:hover { background: var(--color-surface); }
@media (prefers-color-scheme: dark) {
  .lang-switcher__item:hover { background: rgba(255,255,255,.05); }
}
.lang-switcher__item--active { color: var(--color-accent); font-weight: 600; }
.lang-switcher__check { font-size: 1rem; color: var(--color-accent); }

/* ========== Footer ========== */
.content-footer {
  padding: 4rem 0 calc(4rem + env(safe-area-inset-bottom, 0px)); background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
}
@media (prefers-color-scheme: dark) {
  .content-footer { background: #050505; border-top-color: #111827; }
}

.content-footer__container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .content-footer__container { padding: 0 2rem; }
}

.content-footer__inner {
  display: flex; flex-direction: column-reverse; gap: 2rem; align-items: center;
}
@media (min-width: 768px) {
  .content-footer__inner { flex-direction: row; justify-content: space-between; }
}

.content-footer__brand { display: flex; align-items: center; gap: .5rem; }
.content-footer__logo {
  display: flex; align-items: center; gap: .375rem;
  font-size: .875rem; color: var(--color-text-muted);
}
.content-footer__logo-img { height: 32px; width: auto; }

.content-footer__links {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
@media (min-width: 1024px) { .content-footer__links { gap: 1.5rem; } }

.content-footer__link {
  font-size: .875rem; font-weight: 500; color: var(--color-text-secondary);
  transition: color .2s;
}
.content-footer__link:hover { color: var(--color-accent); }

.content-footer__social {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-surface); color: #4b5563;
  transition: background .2s, color .2s;
}
@media (prefers-color-scheme: dark) {
  .content-footer__social { background: #111827; color: #9ca3af; }
  .content-footer__social:hover { background: #1f2937; }
}
.content-footer__social:hover { background: #f3f4f6; }
.content-footer__social-svg { width: 20px; height: 20px; }

/* Mobile: separate nav links and social icons into rows */
@media (max-width: 767px) {
  .content-footer__link { order: 0; }
  .content-footer__social { order: 2; }
  .content-footer__links::after {
    content: '';
    flex-basis: 100%;
    height: 0;
    order: 1;
  }
}

/* --- Material Symbols baseline fix --- */
.material-symbols-outlined { vertical-align: middle; user-select: none; }
