/* =========================
   Root / Base (Django Green x Ink)
========================= */
:root{
  --bg: #f6f8fb;
  --card: #ffffff;

  --primary: #0f766e;        /* deep teal */
  --primary-dark: #115e59;
  --primary-soft: #ccfbf1;

  --accent: #22c55e;         /* green accent */
  --ink: #0b1220;
  --text: rgba(11,18,32,.92);
  --muted: rgba(11,18,32,.66);
  --border: rgba(148,163,184,.25);

  --radius: 14px;
  --shadow: 0 16px 40px rgba(15,23,42,.10);
  --shadow-soft: 0 10px 26px rgba(15,23,42,.08);

  --max: 1120px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(34,197,94,.16), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(15,118,110,.14), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.85;
}

a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

code, pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left: 12px;
  top: 12px;
  width:auto;
  height:auto;
  padding:.6rem .8rem;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  z-index: 9999;
}

/* =========================
   Hero
========================= */
.hero{
  padding: 2.2rem 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.hero-inner{
  max-width: var(--max);
  margin: 0 auto;
}
.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.35rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: .9rem;
  color: rgba(11,18,32,.72);
}
.hero h1{
  margin: .75rem 0 .35rem;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: .02em;
}
.hero-desc{
  margin: 0 0 1rem;
  color: var(--muted);
}

.hero-actions{
  display:flex;
  gap:.6rem;
  flex-wrap: wrap;
  margin: .8rem 0 1.1rem;
}
.btn{
  appearance:none;
  border: 1px solid rgba(15,118,110,.25);
  background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(34,197,94,.10));
  color: var(--primary-dark);
  padding: .55rem .9rem;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 700;
}
.btn:hover{ filter: brightness(0.98); }
.btn:active{ transform: translateY(1px); }
.btn-ghost{
  background: rgba(255,255,255,.70);
  border: 1px solid var(--border);
}

.hero-meta{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}
.meta-card{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  box-shadow: var(--shadow-soft);
}
.meta-k{ font-size: .85rem; color: var(--muted); }
.meta-v{ font-weight: 800; margin-top: .15rem; }

@media (max-width: 820px){
  .hero-meta{ grid-template-columns: 1fr; }
}

/* =========================
   Breadcrumb
========================= */
.breadcrumb{
  max-width: var(--max);
  margin: .9rem auto 0;
  padding: 0 1rem;
  color: var(--muted);
  font-size: .95rem;
}
.breadcrumb a{ color: rgba(11,18,32,.70); }
.breadcrumb a:hover{ color: var(--primary-dark); }
.breadcrumb .sep{ margin: 0 .45rem; color: rgba(11,18,32,.35); }

/* =========================
   Layout
========================= */
.layout{
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem;
  display:flex;
  gap: 1rem;
}
.side{
  width: 290px;
  flex: 0 0 auto;
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
}
.content{
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 980px){
  .layout{ flex-direction: column; }
  .side{
    width: 100%;
    position: relative;
    height: auto;
  }
}

/* =========================
   Side
========================= */
.side-card{
  background: rgba(255,255,255,.76);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.side-title{
  font-weight: 900;
  letter-spacing: .03em;
  margin-bottom: .75rem;
  display:flex;
  align-items:center;
  gap:.5rem;
}
.side-title::before{
  content:"";
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.toc ul{ list-style: none; padding: 0; margin: 0; }
.toc li{ margin: .1rem 0; }
.toc a{
  display:block;
  padding: .45rem .55rem;
  border-radius: 10px;
  color: rgba(11,18,32,.78);
}
.toc a:hover{
  background: rgba(15,118,110,.08);
  text-decoration: none;
}
.toc a.is-active{
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.20);
  color: rgba(11,18,32,.92);
}

.side-mini{
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  color: rgba(11,18,32,.78);
  font-size: .95rem;
}
.mini-title{
  font-weight: 800;
  margin-bottom: .35rem;
}

/* =========================
   Cards / Sections
========================= */
.card{
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  margin: 0 0 1rem;
}
.card h2{
  margin: 0 0 .6rem;
  font-size: 1.25rem;
  letter-spacing: .02em;
  position: relative;
  padding-left: .65rem;
}
.card h2::before{
  content:"";
  position:absolute;
  left:0; top:.3rem;
  width: 4px; height: 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(15,118,110,.9));
}

.card h3{
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}

.muted{ color: var(--muted); }
.note{
  margin-top: .8rem;
  padding: .75rem .85rem;
  border-radius: 12px;
  background: rgba(15,118,110,.08);
  border: 1px solid rgba(15,118,110,.16);
}

.callout{
  margin-top: .9rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.18);
}
.callout-title{
  font-weight: 900;
  margin-bottom: .25rem;
}

/* grids */
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .8rem;
}
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .8rem;
}
@media (max-width: 820px){
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
}

.panel{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .85rem .95rem;
  box-shadow: var(--shadow-soft);
}

/* chips */
.chips{
  list-style:none;
  padding:0;
  margin:.6rem 0 .2rem;
  display:flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.chips li{
  padding: .38rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(15,118,110,.18);
  background: rgba(255,255,255,.70);
  color: rgba(11,18,32,.78);
  font-size: .95rem;
}

/* features */
.feature-list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .8rem;
}
@media (max-width: 820px){
  .feature-list{ grid-template-columns: 1fr; }
}
.feature{
  background: rgba(255,255,255,.74);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow-soft);
}

/* steps */
.steps{
  margin: .6rem 0 .8rem;
  padding-left: 1.2rem;
}
.steps li{ margin: .25rem 0; }

/* check list */
.check{
  list-style:none;
  padding:0;
  margin:.6rem 0 0;
}
.check li{
  padding-left: 1.6rem;
  position: relative;
  margin: .35rem 0;
}
.check li::before{
  content:"✓";
  position:absolute;
  left:0;
  top:0;
  color: var(--accent);
  font-weight: 900;
}

/* code */
.code-wrap{
  margin-top: .8rem;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(15,23,42,.98);
  box-shadow: var(--shadow-soft);
}
.code-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: .55rem .7rem;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  font-size: .9rem;
}
.copy-btn{
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.86);
  padding: .3rem .55rem;
  border-radius: 10px;
  cursor:pointer;
}
.copy-btn:hover{ background: rgba(255,255,255,.12); }
.copy-btn:active{ transform: translateY(1px); }

.code{
  margin: 0;
  padding: .9rem 1rem;
  overflow:auto;
  color: rgba(255,255,255,.90);
  font-size: .93rem;
  line-height: 1.65;
}

/* faq */
.faq{
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .55rem .75rem;
  margin: .55rem 0;
  box-shadow: var(--shadow-soft);
}
.faq summary{
  cursor:pointer;
  font-weight: 900;
}
.faq p{ margin: .45rem 0 0; color: rgba(11,18,32,.78); }

/* links */
.links{
  padding-left: 1.1rem;
}
.links li{ margin: .25rem 0; }

/* footer */
.footer{
  margin: 1.4rem 0 2rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
  color: rgba(11,18,32,.78);
}
.footer p{ margin: .3rem 0; }
.footer small{ color: rgba(11,18,32,.55); }
