/* CCT Lab - refreshed styles
   - Mobile-first
   - Single stylesheet for all pages
   - Visual refresh only: keep existing HTML / JS structure
*/

:root {
  --bg: #f5f4ef;
  --surface: #fffdf8;
  --surface-2: #eef4f3;
  --surface-3: #e4efee;

  --text: #223234;
  --heading: #17373d;
  --muted: #556a6e;
  --muted-2: #74878b;
  --border: rgba(29, 91, 99, 0.14);
  --border-strong: rgba(29, 91, 99, 0.24);

  --brand: #1d5b63;
  --brand-2: #2f7c87;
  --brand-soft: #dcebed;
  --brand-soft-2: rgba(47, 124, 135, 0.08);
  --brand-ink: #ffffff;

  --danger-soft: rgba(190, 65, 65, 0.08);
  --danger-border: rgba(190, 65, 65, 0.18);

  --shadow-sm: 0 8px 20px rgba(18, 36, 40, 0.05);
  --shadow: 0 14px 34px rgba(18, 36, 40, 0.07);
  --shadow-lg: 0 20px 48px rgba(18, 36, 40, 0.09);

  --radius: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --container: 1040px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(220, 235, 237, 0.56), transparent 26%),
    linear-gradient(180deg, #f7f5ef 0%, #f5f4ef 100%);
  line-height: 1.8;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

a:hover {
  color: var(--brand-2);
  text-decoration: none;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

main {
  padding: 28px 0 52px;
}

.page-title {
  margin: 4px 0 12px;
  color: var(--heading);
  font-size: clamp(30px, 5.8vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(29, 91, 99, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--heading);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--heading);
}

.brand-mark {
  font-size: 21px;
  line-height: 1;
}

.brand-gap {
  width: 6px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  background: rgba(29, 91, 99, 0.08);
  color: var(--heading);
}

.nav-link.is-active {
  background: rgba(29, 91, 99, 0.13);
  color: var(--heading);
  box-shadow: inset 0 0 0 1px rgba(29, 91, 99, 0.08);
}

.hero {
  position: relative;
  margin: 4px 0 22px;
  padding: 28px 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(111, 167, 174, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(29, 91, 99, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 246, 240, 0.98));
  border: 1px solid rgba(29, 91, 99, 0.12);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 120px;
  height: 120px;
  border-radius: 39% 61% 58% 42% / 44% 40% 60% 56%;
  background: rgba(220, 235, 237, 0.9);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0 0 14px;
  max-width: 11ch;
  color: var(--heading);
  font-size: clamp(34px, 8vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero p {
  position: relative;
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 16.5px;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

#breadcrumbs {
  margin: 6px 0 12px;
}

.breadcrumbs-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs-item:not(:last-child)::after {
  content: "/";
  color: rgba(116, 135, 139, 0.9);
}

.breadcrumbs-item a {
  color: var(--muted-2);
}

.breadcrumbs-item a:hover {
  color: var(--heading);
}

.card {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 23px;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.card h3 {
  margin: 16px 0 8px;
  color: var(--heading);
  font-size: 18px;
}

.card ul {
  margin: 0;
  padding-left: 1.2em;
}

.card li + li {
  margin-top: 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.notice {
  margin-top: 16px;
  padding: 14px 15px;
  border-radius: 16px;
  background: rgba(29, 91, 99, 0.06);
  border: 1px solid rgba(29, 91, 99, 0.12);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: var(--brand-ink);
  box-shadow: 0 12px 24px rgba(29, 91, 99, 0.2);
}

.btn-primary:hover {
  color: var(--brand-ink);
  box-shadow: 0 16px 28px rgba(29, 91, 99, 0.24);
}

.btn-ghost,
.btn-outline {
  background: rgba(255, 253, 248, 0.7);
  border-color: rgba(29, 91, 99, 0.22);
  color: var(--brand);
}

.btn-ghost:hover,
.btn-outline:hover {
  background: rgba(220, 235, 237, 0.42);
  color: var(--brand);
}

.grid-2 {
  display: grid;
  gap: 18px;
}

.list {
  display: grid;
  gap: 14px;
}

.list.compact {
  gap: 10px;
}

.list-item {
  position: relative;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(29, 91, 99, 0.12);
  border-radius: 18px;
  padding: 16px 15px;
  box-shadow: 0 8px 18px rgba(18, 36, 40, 0.04);
}

.list-item:hover {
  border-color: rgba(29, 91, 99, 0.22);
  box-shadow: 0 12px 24px rgba(18, 36, 40, 0.06);
}

.list-title {
  display: inline-block;
  color: var(--heading);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.list-title:hover {
  color: var(--brand);
}

.list-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.list-meta {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.list-tags {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(29, 91, 99, 0.2);
  color: var(--brand);
  background: rgba(220, 235, 237, 0.45);
}

.topics {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topic-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  background: rgba(220, 235, 237, 0.46);
  border: 1px solid rgba(29, 91, 99, 0.16);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.topic-pill:hover,
.filter-pill:hover {
  background: rgba(220, 235, 237, 0.72);
  color: var(--heading);
}

.filters {
  display: grid;
  gap: 10px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill.is-selected {
  background: linear-gradient(180deg, rgba(47, 124, 135, 0.18), rgba(29, 91, 99, 0.16));
  border-color: rgba(29, 91, 99, 0.26);
  color: var(--heading);
}
.article {
  position: relative;
}

.article-header {
  position: relative;
  margin-bottom: 22px;
  padding: 22px 20px 14px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(111, 167, 174, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(29, 91, 99, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(248, 246, 240, 0.98));
  border: 1px solid rgba(29, 91, 99, 0.12);
  box-shadow: var(--shadow-lg);
}

.kicker {
  margin: 0 0 10px;
  color: var(--brand-2);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
}

.article-header h1 {
  margin: 0;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-size: clamp(34px, 7vw, 62px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 18px;
  color: var(--muted-2);
  font-size: 13px;
}

.article-eyecatch {
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid rgba(29, 91, 99, 0.12);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-radius: 28% 72% 62% 38% / 41% 38% 62% 59%;
}

.article-eyecatch img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.photo-credit {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.9);
}

.photo-credit a {
  color: var(--muted);
  font-weight: 600;
}

.article-body {
  color: var(--text);
  font-size: 17px;
}

.article-body h2 {
  position: relative;
  margin: 32px 0 14px;
  padding: 15px 16px 15px 18px;
  color: var(--heading);
  font-size: 24px;
  line-height: 1.42;
  letter-spacing: -0.02em;
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(220, 235, 237, 0.78), rgba(220, 235, 237, 0.18));
  box-shadow: 0 8px 22px rgba(18, 36, 40, 0.04);
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 14px;
  bottom: 14px;
  width: 5px;
  border-radius: 999px;
  background: rgba(29, 91, 99, 0.5);
}

.article-body h3 {
  margin: 22px 0 8px;
  color: #28484f;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.article-body p {
  margin: 12px 0;
}

.article-body > p:first-of-type {
  font-size: 18px;
  line-height: 1.95;
  color: #314549;
}

.article-body ul,
.article-body ol {
  margin: 12px 0 12px 1.2em;
  padding: 0;
}

.article-body li {
  margin: 7px 0;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 15px 16px;
  border-left: 4px solid rgba(29, 91, 99, 0.4);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(220, 235, 237, 0.62), rgba(220, 235, 237, 0.18));
  color: var(--muted);
}

.article-body code {
  padding: 0.14em 0.42em;
  border-radius: 8px;
  background: rgba(29, 91, 99, 0.08);
  color: #21454b;
  font-size: 0.94em;
}

.article-body strong {
  color: var(--heading);
}

.article-body a {
  text-decoration: underline;
  text-decoration-color: rgba(29, 91, 99, 0.26);
  text-underline-offset: 0.2em;
}

.cct-flow-wrap {
  margin: 28px 0 32px;
  padding: 16px;
  border-radius: 26px;
  border: 1px solid rgba(29, 91, 99, 0.12);
  box-shadow: var(--shadow-sm);
}

.cct-flow-wrap.is-dissonance {
  background: linear-gradient(180deg, rgba(190, 65, 65, 0.08), rgba(190, 65, 65, 0.03));
  border-color: var(--danger-border);
}

.cct-flow-wrap.is-resolution {
  background: linear-gradient(180deg, rgba(220, 235, 237, 0.72), rgba(220, 235, 237, 0.26));
  border-color: rgba(29, 91, 99, 0.16);
}

.cct-flow-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 10px;
}

.cct-flow-kicker {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.cct-flow-title {
  font-size: 16px;
  font-weight: 700;
}

.cct-flow-wrap.is-dissonance .cct-flow-kicker,
.cct-flow-wrap.is-dissonance .cct-flow-title {
  color: #8f2f2f;
}

.cct-flow-wrap.is-resolution .cct-flow-kicker,
.cct-flow-wrap.is-resolution .cct-flow-title {
  color: #2e5f54;
}

.cct-flow-svg {
  display: block;
  width: 100%;
  height: auto;
}

.cct-flow-box {
  fill: #ffffff;
  stroke-width: 1.5;
}

.cct-flow-wrap.is-dissonance .cct-flow-box {
  stroke: #efcaca;
}

.cct-flow-wrap.is-resolution .cct-flow-box {
  stroke: #d3e2e0;
}

.cct-flow-line {
  stroke-width: 3.6;
  stroke-linecap: round;
}

.cct-flow-wrap.is-dissonance .cct-flow-line {
  stroke: #c26161;
}

.cct-flow-wrap.is-resolution .cct-flow-line {
  stroke: #6f9ba0;
}

.cct-flow-wrap.is-dissonance .cct-flow-head {
  fill: #c26161;
}

.cct-flow-wrap.is-resolution .cct-flow-head {
  fill: #6f9ba0;
}

.cct-flow-label {
  font-size: 13px;
  font-weight: 700;
}

.cct-flow-value {
  font-size: 16px;
  font-weight: 600;
}

.cct-flow-wrap.is-dissonance .cct-flow-label {
  fill: #9d5555;
}

.cct-flow-wrap.is-dissonance .cct-flow-value {
  fill: #2b1c1c;
}

.cct-flow-wrap.is-resolution .cct-flow-label {
  fill: #5d7b80;
}

.cct-flow-wrap.is-resolution .cct-flow-value {
  fill: #1f2d30;
}

.paper-card {
  margin: 36px 0 18px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #f8fcfb 0%, #f1f7f6 100%);
  color: #1f2937;
  box-shadow: var(--shadow);
  border: 1px solid rgba(29, 91, 99, 0.16);
}

.paper-card-top {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(29, 91, 99, 0.12);
  background: linear-gradient(180deg, rgba(220, 235, 237, 0.9), rgba(220, 235, 237, 0.35));
}

.paper-card-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5f8084;
  font-weight: 700;
}

.paper-card-title {
  margin: 0;
  color: var(--heading);
  line-height: 1.5;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.paper-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.paper-card-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(29, 91, 99, 0.08);
  color: #49676d;
  font-size: 14px;
  line-height: 1.2;
  border: 1px solid rgba(29, 91, 99, 0.12);
}

.paper-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffffff;
  color: #2f5e66;
  font-weight: 700;
  border: 1px solid rgba(29, 91, 99, 0.16);
}

.paper-card-link:hover {
  background: #f8fbfb;
}

.paper-card-bottom {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.paper-card-item {
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(29, 91, 99, 0.12);
}

.paper-card-item.is-accent {
  background: rgba(220, 235, 237, 0.34);
}

.paper-card-item-label {
  margin-bottom: 6px;
  color: #5d7b80;
  font-size: 13px;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.paper-card-item-value {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.78;
  word-break: break-word;
}

#site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(238, 244, 243, 0.66), rgba(228, 239, 238, 0.9));
  padding: 24px 0 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 13px;
}

.footer-links a {
  color: var(--muted-2);
  font-weight: 650;
}

.footer-links a:hover {
  color: var(--heading);
}

.footer-links .dot {
  opacity: 0.7;
}

.footer-note {
  color: var(--muted-2);
  font-size: 13px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    padding: 36px 34px;
  }
  .article-header {
    padding: 28px 28px 16px;
  }
}

@media (min-width: 860px) {
  .paper-card-bottom {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    gap: 6px;
  }
  .nav-link {
    padding: 8px 10px;
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }
  main {
    padding: 22px 0 42px;
  }
  .header-inner {
    padding: 12px 0;
    align-items: flex-start;
  }
  .brand-mark {
    font-size: 20px;
  }
  .nav {
    justify-content: flex-end;
  }
  .nav-link {
    padding: 7px 9px;
    font-size: 13px;
  }
  .hero {
    margin-top: 2px;
    padding: 24px 18px;
    border-radius: 24px;
  }
  .hero::after {
    width: 92px;
    height: 92px;
  }
  .hero p {
    font-size: 15.5px;
  }
  .card {
    padding: 18px;
    border-radius: 20px;
  }
  .lead {
    font-size: 16.5px;
  }
  .article-body {
    font-size: 16.5px;
  }
  .article-header {
    padding: 18px 16px 10px;
    border-radius: 24px;
  }
  .article-meta {
    gap: 6px;
  }
  .article-eyecatch {
    border-radius: 26% 74% 60% 40% / 40% 38% 62% 60%;
  }
  .article-body h2 {
    padding: 13px 14px 13px 16px;
    border-radius: 18px;
    font-size: 22px;
  }
  .cct-flow-wrap {
    padding: 14px;
    border-radius: 22px;
  }
  .paper-card {
    border-radius: 24px;
  }
  .paper-card-top {
    padding: 16px 16px 14px;
  }
  .paper-card-title {
    font-size: 18px;
  }
  .paper-card-bottom {
    padding: 14px;
  }
}

.article-quote {
  display: flex;
  gap: 14px;
  margin: 24px 0 28px;
  padding: 20px 20px 20px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(220, 235, 237, 0.62), rgba(220, 235, 237, 0.18));
  border: 1px solid rgba(29, 91, 99, 0.16);
  box-shadow: var(--shadow-sm);
}

.article-quote-mark {
  flex-shrink: 0;
  font-size: 52px;
  line-height: 1;
  color: rgba(29, 91, 99, 0.22);
  font-family: Georgia, serif;
  margin-top: -6px;
  user-select: none;
}

.article-quote-body {
  flex: 1;
  min-width: 0;
}

.article-quote-en {
  margin: 0 0 10px;
  color: var(--heading);
  font-style: italic;
  font-size: 16px;
  line-height: 1.85;
  word-break: break-word;
}

.article-quote-ja {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 560px) {
  .article-quote {
    gap: 10px;
    padding: 16px 16px 16px 14px;
    border-radius: 18px;
  }
  .article-quote-mark {
    font-size: 40px;
  }
  .article-quote-en {
    font-size: 15px;
  }
  .article-quote-ja {
    font-size: 13.5px;
  }
}

