:root{
  --bg: #fbfaf7;
  --paper: #ffffff;
  --text: #1e1a17;
  --muted: #6a625c;
  --line: rgba(30, 26, 23, 0.12);
  --orange: #fbb16a;
  --orange-deep: #d98034;
  --sand: #deb28a;
  --max: 1180px;
}

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

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

body{
  margin: 0;
  min-height: 100svh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

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

.site-header{
  background: var(--orange);
  border-bottom: 1px solid rgba(30, 26, 23, 0.08);
}

.site-header-inner,
.page-shell,
.site-footer-inner{
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header-inner{
  padding: 1.55rem 0;
}

.site-brand{
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}


.site-brand strong,
.site-brand small{
  display: block;
}

.site-brand strong{
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.35rem;
  line-height: 1.1;
}

.site-brand small{
  color: rgba(30, 26, 23, 0.72);
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

.page-shell{
  flex: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0 3rem;
}

.sidebar{
  border-right: 1px solid var(--line);
  padding-right: 1.25rem;
}

.sidebar nav{
  position: sticky;
  top: 1rem;
}

.sidebar ol{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.sidebar a{
  display: block;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  font-weight: 650;
}

.sidebar a:hover,
.sidebar a:focus-visible{
  color: var(--text);
  outline: none;
  background: rgba(251, 177, 106, 0.18);
}

.sidebar a.active{
  color: var(--text);
  background: rgba(251, 177, 106, 0.32);
  box-shadow: inset 3px 0 0 var(--orange-deep);
}

.content{
  min-width: 0;
}

.tutorial-article{
  max-width: 760px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 12px 28px rgba(30, 26, 23, 0.05);
}

.tutorial-article h1{
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.tutorial-article h2,
.tutorial-article h3{
  margin: 1.7rem 0 0.6rem;
  line-height: 1.2;
}

.tutorial-article p{
  margin: 0 0 1rem;
}

.tutorial-article a{
  color: var(--orange-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.tutorial-article a:hover{
  color: #a95f24;
}

.tutorial-article a:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}

.tutorial-article ul,
.tutorial-article ol{
  padding-left: 1.2rem;
}

.tutorial-article li{
  margin: 0.35rem 0;
}

.tutorial-article code{
  border-radius: 4px;
  padding: 0.08rem 0.24rem;
  background: #f7f2ed;
  font-size: 0.94em;
}

.tutorial-article pre{
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem;
  background: #f7f2ed;
}

.tutorial-article pre code{
  padding: 0;
  background: transparent;
}

.tutorial-article blockquote{
  margin: 1rem 0;
  border-left: 3px solid var(--orange-deep);
  padding: 0.75rem 1rem;
  background: rgba(251, 177, 106, 0.12);
  color: var(--muted);
}

.tutorial-article blockquote p:last-child{
  margin-bottom: 0;
}

.tutorial-article hr{
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.tutorial-article .table-scroll{
  max-width: 100%;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.tutorial-article table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tutorial-article th,
.tutorial-article td{
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  vertical-align: top;
}

.tutorial-article th{
  background: rgba(251, 177, 106, 0.18);
  font-weight: 700;
}

.tutorial-article td code{
  padding: 0;
  background: transparent;
}

.tutorial-article tbody tr:nth-child(even){
  background: #fbfaf7;
}

.site-footer{
  background: var(--sand);
  border-top: 1px solid rgba(30, 26, 23, 0.08);
}

.site-footer-inner{
  min-height: 52px;
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  color: var(--text);
}

.footer-tagline{
  font-family: "Allison", cursive;
  font-size: 24px;
  line-height: 1.05;
  margin-top: 0.1rem;
  margin-left: 1.4ch;
  letter-spacing: 0.1px;
  color: #111;
  white-space: nowrap;
  transform: translateY(1px);
  font-weight: 400;
  text-shadow:
    0.08px 0 currentColor,
    -0.08px 0 currentColor,
    0 0.08px currentColor,
    0 -0.08px currentColor;
}

@media (max-width: 760px){
  .page-shell{
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1rem;
  }

  .sidebar{
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 1rem;
  }

  .sidebar nav{
    position: static;
  }

  .tutorial-article{
    padding: 1.1rem;
  }

  .site-footer-inner{
    flex-direction: column;
  }
}
