/* Sakura Nihongo — original editorial learning design */
:root {
  --ink:#213d3b;
  --forest:#244d47;
  --paper:#fffdf8;
  --cream:#f5f1e7;
  --rose:#d57684;
  --soft:#f9e9e7;
  --line:#e8e5dc;
  --muted:#65746d;
  --max:1160px
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  line-height:1.85
}

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

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

a:focus-visible {
  outline:3px solid #d57684;
  outline-offset:4px
}

button {
  font:inherit
}

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

.skip {
  position:absolute;
  top:-80px;
  left:12px;
  background:white;
  z-index:20;
  padding:8px
}

.skip:focus {
  top:8px
}

.topbar {
  background:var(--forest);
  color:#fff;
  padding:8px 0;
  font-size:12px;
  letter-spacing:.08em
}

.topbar .container {
  display:flex;
  justify-content:space-between;
  gap:10px
}

.site-header {
  background:#fffdf8eF;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:blur(12px)
}

.header-inner {
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px
}

.logo {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:22px;
  font-weight:800;
  letter-spacing:.05em;
  white-space:nowrap
}

.logo-mark {
  height:42px;
  width:42px;
  border-radius:14px;
  background:var(--soft);
  display:grid;
  place-items:center;
  font-size:25px
}

.logo small {
  font-size:10px;
  color:var(--muted);
  font-weight:500;
  display:block;
  letter-spacing:.14em;
  line-height:1.2
}

.nav {
  display:flex;
  gap:25px;
  align-items:center;
  font-size:14px;
  font-weight:700
}

.nav a:hover,.footer a:hover,.card h3 a:hover {
  color:var(--rose)
}

.header-cta,.btn {
  background:var(--forest);
  color:white;
  padding:12px 22px;
  border-radius:6px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  justify-content:center
}

.btn.light {
  background:white;
  color:var(--forest);
  border:1px solid var(--line)
}

.btn.pink {
  background:var(--rose)
}

.hero {
  padding:48px 0 60px;
  overflow:hidden
}

.hero-layout {
  display:grid;
  grid-template-columns:1.02fr .98fr;
  gap:36px;
  align-items:center
}

.eyebrow {
  color:var(--rose);
  font-weight:800;
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase
}

.hero h1 {
  font-size:clamp(36px,4.6vw,65px);
  line-height:1.25;
  letter-spacing:-.035em;
  margin:19px 0 24px
}

.hero h1 span {
  color:var(--rose)
}

.hero-text {
  color:var(--muted);
  font-size:16px;
  max-width:550px
}

.hero-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px
}

.hero-note {
  margin-top:28px;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:13px
}

.hero-art {
  display:grid;
  grid-template-columns:1.15fr .75fr;
  grid-template-rows:210px 185px;
  gap:13px;
  position:relative
}

.hero-art img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:8px
}

.hero-art img:first-child {
  grid-row:span 2
}

.art-label {
  position:absolute;
  bottom:21px;
  left:18px;
  background:#fffdf8ed;
  padding:13px 17px;
  border-radius:6px;
  font-weight:800;
  box-shadow:0 14px 30px #1d302018
}

.art-label small {
  display:block;
  color:var(--muted);
  font-size:11px;
  font-weight:400
}

.section {
  padding:68px 0
}

.section.tint {
  background:var(--cream)
}

.section-heading {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:end;
  margin-bottom:28px
}

.kicker {
  font-size:12px;
  letter-spacing:.19em;
  color:var(--rose);
  font-weight:800
}

.section h2 {
  font-size:clamp(26px,3vw,36px);
  margin:8px 0;
  line-height:1.4
}

.section-heading p {
  color:var(--muted);
  margin:5px 0 0
}

.text-link {
  color:var(--forest);
  font-weight:800;
  border-bottom:1px solid currentColor;
  white-space:nowrap
}

.paths {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px
}

.path {
  background:#fff;
  border:1px solid var(--line);
  padding:22px;
  border-radius:9px;
  min-height:198px;
  display:flex;
  flex-direction:column;
  align-items:start
}

.path-icon {
  font-size:27px
}

.path h3 {
  font-size:20px;
  margin:12px 0 7px
}

.path p {
  font-size:13px;
  color:var(--muted);
  margin:0 0 12px
}

.path strong {
  margin-top:auto;
  color:var(--rose);
  font-size:12px
}

.cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:23px
}

.card {
  background:white;
  border:1px solid var(--line);
  border-radius:9px;
  overflow:hidden;
  min-width:0
}

.card img {
  width:100%;
  height:195px;
  object-fit:cover
}

.card-content {
  padding:19px
}

.tag {
  font-size:11px;
  font-weight:800;
  color:var(--rose);
  letter-spacing:.07em
}

.card h3 {
  font-size:20px;
  line-height:1.52;
  margin:7px 0 9px
}

.card p {
  color:var(--muted);
  font-size:13px;
  margin:0 0 13px
}

.card .read {
  font-size:13px;
  color:var(--forest);
  font-weight:800
}

.feature {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:36px;
  align-items:center
}

.feature img {
  width:100%;
  height:420px;
  object-fit:cover;
  border-radius:8px
}

.feature h2 {
  font-size:34px;
  line-height:1.45
}

.feature p {
  color:var(--muted)
}

.study-steps {
  counter-reset:steps;
  list-style:none;
  padding:0;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px
}

.study-steps li {
  background:white;
  border:1px solid var(--line);
  padding:22px;
  border-radius:8px
}

.study-steps li:before {
  counter-increment:steps;
  content:'0' counter(steps);
  display:block;
  color:var(--rose);
  font-size:30px;
  font-weight:800
}

.study-steps strong {
  display:block;
  margin:6px 0
}

.study-steps span {
  color:var(--muted);
  font-size:13px
}

.footer {
  background:#203d38;
  color:#fff;
  padding:46px 0 25px
}

.footer-grid {
  display:grid;
  grid-template-columns:1.6fr 1fr 1fr;
  gap:30px
}

.footer a {
  display:block;
  margin:7px 0;
  color:#e1eae2;
  font-size:13px
}

.footer p {
  color:#c9d4cd;
  font-size:13px
}

.copyright {
  border-top:1px solid #ffffff22;
  padding-top:22px;
  margin-top:25px;
  font-size:12px;
  color:#c9d4cd
}

.page-head {
  background:var(--cream);
  padding:48px 0
}

.crumb {
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px
}

.crumb a {
  text-decoration:underline
}

.page-head h1 {
  font-size:clamp(28px,4vw,46px);
  line-height:1.4;
  margin:5px 0 12px
}

.page-head p {
  max-width:740px;
  color:var(--muted);
  margin:0
}

.article-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 270px;
  gap:46px;
  align-items:start;
  padding:46px 0 82px
}

.article-body {
  min-width:0;
  font-size:16px
}

.article-body>img {
  width:100%;
  max-height:420px;
  object-fit:cover;
  border-radius:9px;
  margin-bottom:28px
}

.article-body .lead {
  font-size:19px;
  color:var(--forest);
  font-weight:600
}

.article-body h2 {
  font-size:25px;
  margin-top:34px;
  margin-bottom:10px;
  line-height:1.4
}

.article-body p {
  line-height:2.05
}

.tip {
  background:var(--cream);
  padding:20px;
  border-left:4px solid var(--rose);
  margin-top:30px
}

.sidebar {
  background:#f8f5ed;
  border:1px solid var(--line);
  border-radius:8px;
  padding:20px
}

.sidebar h2 {
  font-size:17px;
  margin:0 0 13px
}

.sidebar a {
  display:block;
  border-top:1px solid var(--line);
  padding:12px 0;
  font-size:13px;
  font-weight:700
}

.topic-intro {
  margin:0 0 25px;
  max-width:780px;
  color:var(--muted)
}

.article-list {
  padding:50px 0 75px
}

.article-list .cards {
  row-gap:22px
}

.about-content {
  max-width:800px;
  margin:50px auto 80px
}

.about-content h2 {
  font-size:25px
}

.about-content p {
  color:var(--muted)
}

@media(max-width:980px) {
  .nav {
    gap:13px;
    font-size:12px
  }
  .header-cta {
    display:none
  }
  .paths {
    grid-template-columns:repeat(2,1fr)
  }
  .hero-layout {
    gap:20px
  }
  .hero-art {
    grid-template-rows:175px 155px
  }
  .study-steps {
    grid-template-columns:repeat(2,1fr)
  }
}

@media(max-width:680px) {
  .container {
    width:calc(100% - 28px)
  }
  .topbar .container span:last-child {
    display:none
  }
  .header-inner {
    display:block;
    padding:12px 0
  }
  .logo {
    font-size:19px
  }
  .nav {
    margin-top:12px;
    padding-bottom:4px;
    overflow-x:auto;
    white-space:nowrap;
    gap:18px;
    scrollbar-width:thin
  }
  .hero {
    padding:32px 0
  }
  .hero-layout,.feature {
    grid-template-columns:1fr
  }
  .hero h1 {
    font-size:36px
  }
  .hero-art {
    grid-template-rows:155px 130px
  }
  .section {
    padding:44px 0
  }
  .section-heading {
    align-items:start;
    flex-direction:column
  }
  .paths,.cards {
    grid-template-columns:1fr
  }
  .path {
    min-height:auto
  }
  .card img {
    height:220px
  }
  .feature img {
    height:280px
  }
  .study-steps {
    grid-template-columns:1fr 1fr;
    gap:10px
  }
  .study-steps li {
    padding:16px
  }
  .footer-grid {
    grid-template-columns:1fr 1fr
  }
  .footer-grid>div:first-child {
    grid-column:span 2
  }
  .article-layout {
    grid-template-columns:1fr;
    gap:24px
  }
  .page-head {
    padding:32px 0
  }
  .article-body h2 {
    font-size:23px
  }
}

@media(max-width:360px) {
  .hero h1 {
    font-size:30px
  }
  .study-steps {
    grid-template-columns:1fr
  }
  .hero-actions .btn {
    width:100%
  }
}

/* Responsive guardrails: prevent overflow without hiding useful content. */
html {
  overflow-wrap: break-word;
}
.hero-layout > *,
.feature > *,
.article-layout > *,
.cards > *,
.paths > * {
  min-width: 0;
}
@media (max-width: 680px) {
  .site-header .container {
    min-width: 0;
  }
  .nav {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .hero-text {
    overflow-wrap: anywhere;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
}
