/* Tutorial shared styles — sidebar layout, hero, body, media */

.tut-hero {
  padding: 190px 24px 60px;
  background: var(--k-cream);
  position: relative; overflow: hidden;
}
.tut-hero::before {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: var(--k-lemon);
  top: -160px; right: -140px;
  z-index: 0;
  animation: splat-morph 12s ease-in-out infinite;
}
.tut-hero-inner {
  max-width: 780px; margin: 0 auto;
  position: relative; z-index: 2;
}
.tut-crumbs {
  display: none !important;
}
.tut-crumbs a { color: var(--k-muted); transition: color .15s;}
.tut-crumbs a:hover { color: var(--k-ink);}
.tut-crumbs .sep { opacity: .35;}
.tut-meta {
  display: flex; gap: 20px; font-family: var(--font-mono);
  font-size: 12px; color: var(--k-muted); letter-spacing: .05em;
  margin: 24px 0 0; flex-wrap: wrap;
}
.tut-meta span::before { content: '◈ '; opacity: .5;}
.tut-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--k-ink);
  margin-bottom: 18px;
}
.tut-hero h1 .hl { color: var(--k-green); padding: 0;}
.tut-hero-lead {
  font-size: 19px; line-height: 1.55;
  color: var(--k-ink); opacity: .82;
  max-width: 640px;
}

.tut-layout {
  padding: 60px 24px 100px;
  background: var(--k-paper);
}
.tut-layout-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
.tut-side { position: relative; align-self: stretch;}
.tut-side-sticky {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}
.tut-side-sticky::-webkit-scrollbar { width: 6px;}
.tut-side-sticky::-webkit-scrollbar-thumb { background: rgba(10,26,15,.15); border-radius: 3px;}
.tut-side-title {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--k-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--k-ink);
}
.tut-side-list { list-style: none; margin: 0; padding: 0;}
.tut-side-list li { margin: 0;}
.tut-side-list a {
  display: block;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  margin-left: -3px;
  font-size: 14.5px; font-weight: 600;
  color: var(--k-muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color .15s, border-color .15s, background .15s;
}
.tut-side-list a:hover { color: var(--k-ink);}
.tut-side-list a.is-active {
  color: var(--k-ink);
  border-left-color: var(--k-ink);
  background: var(--k-lemon-soft);
}

.tut-body { min-width: 0;}
.tut-body-inner {
  max-width: 780px;
  font-size: 17px; line-height: 1.7;
  color: var(--k-ink);
}
.tut-body-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -.025em; line-height: 1.15;
  margin: 60px 0 20px;
  color: var(--k-ink);
  scroll-margin-top: 140px;
}
.tut-body-inner h2:first-child { margin-top: 0;}
.tut-body-inner h2 .hl { color: var(--k-green); padding: 0;}
.tut-body-inner h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: -.02em; line-height: 1.2;
  margin: 40px 0 14px;
  color: var(--k-ink);
  scroll-margin-top: 140px;
}
.tut-body-inner p { margin: 0 0 20px;}
.tut-body-inner p b,
.tut-body-inner li b { color: var(--k-green); font-weight: 700;}
.tut-body-inner a { color: var(--k-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;}
.tut-body-inner code {
  font-family: var(--font-mono); background: var(--k-cream);
  padding: 2px 7px; border-radius: 4px;
  border: 1px solid rgba(10,26,15,.12);
  font-size: 14px; font-weight: 600;
}
.tut-body-inner ul { list-style: none; margin: 0 0 24px; padding: 0;}
.tut-body-inner ul li { padding: 8px 0 8px 24px; position: relative;}
.tut-body-inner ul li::before {
  content: '●'; position: absolute; left: 0;
  color: var(--k-coral); font-size: 12px; top: 12px;
}
.tut-body-inner ol { margin: 0 0 24px; padding-left: 24px;}
.tut-body-inner ol li { padding: 6px 0; padding-left: 8px;}

/* Two-column compact block list (Contact Page tutorial) */
.tut-body-inner ul.tut-blocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  margin: 12px 0 24px;
}
.tut-body-inner ul.tut-blocks li { padding: 6px 0 6px 18px;}
.tut-body-inner ul.tut-blocks li::before { top: 10px;}
@media (max-width: 700px) {
  .tut-body-inner ul.tut-blocks { grid-template-columns: 1fr;}
}

.tut-body-inner .tut-tbl {
  width: 100%;
  margin: 24px 0;
  background: var(--k-white);
  border: 2.5px solid var(--k-ink); border-radius: var(--r-md);
  box-shadow: 5px 5px 0 var(--k-ink);
  overflow: hidden;
  border-collapse: collapse;
  font-size: 15px;
}
.tut-body-inner .tut-tbl thead th {
  padding: 14px 16px;
  background: var(--k-ink); color: var(--k-cream);
  font-family: var(--font-display); font-weight: 800;
  text-align: left;
  border-right: 1px solid rgba(232,255,59,.15);
}
.tut-body-inner .tut-tbl thead th:last-child { border-right: none;}
.tut-body-inner .tut-tbl tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(10,26,15,.08);
  border-right: 1px solid rgba(10,26,15,.05);
  vertical-align: top;
}
.tut-body-inner .tut-tbl tbody tr:last-child td { border-bottom: none;}
.tut-body-inner .tut-tbl tbody td:first-child {
  font-family: var(--font-display); font-weight: 800;
  background: var(--k-cream);
}

.tut-callout {
  margin: 30px 0;
  padding: 18px 22px;
  background: var(--k-lemon-soft);
  border-left: 4px solid var(--k-lemon);
  border-radius: 4px;
  font-size: 15.5px; line-height: 1.55;
}
.tut-callout b { color: var(--k-green-dark);}

.tut-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 32px 0;
  border: 3px solid var(--k-ink);
  border-radius: var(--r-md);
  box-shadow: 6px 6px 0 var(--k-ink);
  background: var(--k-white);
}
.tut-img-cap {
  display: block;
  text-align: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--k-muted); letter-spacing: .04em;
  margin: -18px 0 32px;
}

.tut-field-list {
  margin: 20px 0 32px;
  border: 2.5px solid var(--k-ink); border-radius: var(--r-md);
  overflow: hidden;
  background: var(--k-white);
  box-shadow: 5px 5px 0 var(--k-ink);
}
.tut-field-list .tut-field {
  padding: 16px 20px;
  border-bottom: 1.5px solid rgba(10,26,15,.08);
}
.tut-field-list .tut-field:last-child { border-bottom: none;}
.tut-field-list .tut-field-h {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.tut-field-list .tut-field-h b {
  color: var(--k-green); font-weight: 800; font-size: 16px;
}
.tut-field-list .tut-field-h .tut-field-meta {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--k-muted); letter-spacing: .04em; text-transform: uppercase;
}
.tut-field-list .tut-field p { margin: 0; font-size: 15.5px; line-height: 1.6;}

.tut-cta-box {
  margin: 40px 0;
  padding: 28px 30px;
  background: var(--k-ink); color: var(--k-cream);
  border: 3px solid var(--k-ink); border-radius: var(--r-lg);
  box-shadow: 6px 6px 0 var(--k-lemon);
  text-align: center;
}
.tut-cta-box h3 {
  font-family: var(--font-display); font-size: 24px; font-weight: 800;
  letter-spacing: -.02em;
  color: var(--k-cream); margin-bottom: 8px;
}
.tut-cta-box p {
  font-size: 15px; color: rgba(245,239,224,.75);
  margin-bottom: 20px;
}

@media (max-width: 1000px) {
  .tut-layout-inner { grid-template-columns: 1fr; gap: 0;}
  .tut-side {
    position: sticky; top: 64px; z-index: 30;
    background: var(--k-paper);
    margin: 0 -18px 20px; padding: 10px 18px 8px;
    border-bottom: 2px solid var(--k-ink);
    height: auto;
  }
  .tut-side-sticky {
    position: static; top: auto; left: auto;
    width: auto; max-height: none; overflow: visible;
    padding-right: 0;
  }
  .tut-side-title { display: none;}
  .tut-side-list {
    display: flex; gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tut-side-list::-webkit-scrollbar { display: none;}
  .tut-side-list li { flex-shrink: 0;}
  .tut-side-list a {
    padding: 6px 12px;
    border-left: none;
    border: 2px solid transparent;
    border-radius: 999px;
    margin-left: 0;
    font-size: 13px;
    white-space: nowrap;
  }
  .tut-side-list a.is-active {
    background: var(--k-ink); color: var(--k-cream);
    border-color: var(--k-ink);
  }
}
@media (max-width: 900px) {
  .tut-hero { padding: 150px 18px 40px;}
  .tut-layout { padding: 40px 18px 60px;}
  .tut-body-inner { font-size: 16px;}
  .tut-body-inner .tut-tbl { font-size: 13px;}
  .tut-body-inner .tut-tbl thead th, .tut-body-inner .tut-tbl tbody td { padding: 10px 12px;}
}

/* Align tutorial articles with the refreshed site language. */
.tut-hero {
  padding: 150px max(5vw, 22px) 72px;
  background: #26c76b;
  min-height: 0;
}
.tut-hero::before { display: none; }
.tut-hero-inner { max-width: 1240px; }
.tut-hero h1 {
  max-width: 950px;
  color: #fff;
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: .98;
}
.tut-hero h1 .hl { color: #09311f; }
.tut-hero-lead { color: #effff3; opacity: 1; max-width: 760px; }
.tut-meta { color: #e4f9e9; }
.tut-layout { background: #f0faef; }
.tut-layout-inner { max-width: 1240px; }
.tut-side-title { border-bottom: 1px solid #cce7d5; color: #376e50; }
.tut-side-list a { border-radius: 0 10px 10px 0; }
.tut-side-list a.is-active { background: #dff5e4; border-left-color: #16885a; color: #124d32; }
.tut-body-inner .tut-tbl,
.tut-field-list,
.tut-img {
  border: 1px solid #d9eadf;
  box-shadow: 0 12px 30px rgba(6, 50, 28, .07);
  border-radius: 18px;
}
.tut-body-inner ul li::before { color: #16885a; }
.tut-callout { background: #e4f7e9; border-left-color: #16885a; border-radius: 12px; }
.tut-cta-box { border: 0; box-shadow: none; border-radius: 22px; }
@media (max-width: 900px) {
  .tut-hero { padding: 120px 20px 56px; }
  .tut-layout-inner { grid-template-columns: minmax(0, 1fr); }
  .tut-side, .tut-body, .tut-body-inner { min-width: 0; }
  .tut-side { background: #f0faef; border-bottom: 1px solid #d9eadf; }
  .tut-side-list a.is-active { border-color: #16885a; background: #e4f7e9; color: #124d32; }
}

/* Detail pages also include their own older styles after this stylesheet.
   Scope these rules to the article layout so they remain the shared visual source. */
.tut-hero .tut-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  gap: 10px;
}
.tut-hero .tut-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.tut-hero .tut-meta span::before { content: none; }
.tut-layout .tut-callout,
.tut-layout .tut-lang-cta-card,
.tut-layout .tut-dedicated-cta {
  background: #e5f7e9;
  border: 1px solid #cce9d4;
  border-radius: 18px;
  box-shadow: none;
  padding: 22px 24px;
}
.tut-layout .tut-callout-title,
.tut-layout .tut-dedicated-eyebrow {
  color: #126b43;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.tut-layout .tut-tree,
.tut-layout .tut-tier,
.tut-layout .tut-handoff-card,
.tut-layout .tut-lang-stat,
.tut-layout .tut-lang-chip,
.tut-layout .tut-lang-card,
.tut-layout .tut-script-chip,
.tut-layout .tut-lang-table-wrap,
.tut-layout .tut-faq,
.tut-layout .tut-figure img {
  background: #fff;
  border: 1px solid #d9eadf;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(6,50,28,.06);
}
.tut-layout .tut-tier-1 { background: #fff; }
.tut-layout .tut-tier-2 { background: #f5fcf6; }
.tut-layout .tut-tier-badge,
.tut-layout .tut-handoff-badge,
.tut-layout .tut-lang-chip-code,
.tut-layout .tut-lang-card-code,
.tut-layout .tut-script-count {
  background: #dcf4e4;
  color: #14583a;
  border-radius: 7px;
}
.tut-layout .tut-tier-action {
  background: #0a3725;
  color: #fff;
  border-radius: 11px;
}
.tut-layout .tut-tier-action::before { color: #79e6a3; }
.tut-layout .tut-steps > li::before {
  background: #dcf4e4;
  color: #126b43;
  border-radius: 8px;
}
.tut-layout .tut-lang-chip:hover,
.tut-layout .tut-lang-card > summary:hover,
.tut-layout .tut-lang-card[open] > summary,
.tut-layout .tut-lang-table tbody tr:hover { background: #eaf8ed; }
.tut-layout .tut-lang-card[open] > summary { border-bottom: 1px solid #d9eadf; }
.tut-layout .tut-lang-card-group-A,
.tut-layout .tut-lang-card-group-B { background: #e5f7e9; color: #14583a; }
.tut-layout .tut-tier-examples code,
.tut-layout .tut-phrase-list code,
.tut-layout .tut-lang-table .col-code code {
  background: #f4faf5;
  border: 1px solid #d9eadf;
  border-radius: 7px;
}
.tut-layout .tut-lang-table thead th {
  background: #eaf8ed;
  color: #134a32;
  border-bottom: 1px solid #d9eadf;
}
.tut-layout .tut-code {
  background: #0a3725;
  color: #e7f8ed;
  border-radius: 15px;
}
.tut-layout .tut-note { background: #e5f7e9; border-left-color: #1e9e5e; border-radius: 10px; }
.tut-layout .tut-cta,
.tut-layout .tut-cta-box {
  background: #0a3725;
  color: #fff;
  border: 0;
  border-radius: 22px;
  box-shadow: none;
}
.tut-layout .tut-cta-btn,
.tut-layout .tut-dedicated-btn,
.tut-layout .tut-lang-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a3725;
  color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}
.tut-layout .tut-cta-btn { background: #ddfa86; color: #0a3725; }
.tut-layout .tut-cta-btn:hover,
.tut-layout .tut-dedicated-btn:hover,
.tut-layout .tut-lang-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(5,48,27,.15);
}
@media (max-width: 700px) {
  .tut-layout .tut-lang-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tut-layout .tut-cta,
  .tut-layout .tut-dedicated-cta,
  .tut-layout .tut-lang-cta-card { grid-template-columns: 1fr; }
  .tut-layout .tut-callout,
  .tut-layout .tut-lang-cta-card,
  .tut-layout .tut-dedicated-cta { padding: 18px; }
}
