/* The guide: an index beside one long article, on the site's base styles. */

.lang-switch { display: flex; gap: 4px; margin-left: clamp(14px, 3vw, 32px); }
.lang-switch a {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--ink-soft);
}
.lang-switch a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.top .right { display: flex; align-items: center; }

.guide {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px clamp(20px, 5vw, 64px) 80px;
}

.toc {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  font-size: .92rem;
}
.toc p { margin: 0 0 10px; font-weight: 700; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 2px 0; }
.toc a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
}
.toc a:hover { background: rgb(47 111 228 / 8%); color: var(--ink); }
.toc ol ol a { padding-left: 22px; font-size: .88rem; }

.article { max-width: 760px; }
.article > header h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -.04em;
  line-height: 1.05;
}
.article > header p { margin: 0; font-size: 1.12rem; color: var(--ink-soft); }

.article section { padding-top: 34px; scroll-margin-top: 16px; }
.article h2 {
  margin: 18px 0 12px;
  font-size: 1.75rem;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.article h3 { margin: 26px 0 8px; font-size: 1.18rem; scroll-margin-top: 16px; }
.article p, .article li { color: #1d2747; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 6px 0; }
.article dl { margin: 12px 0; }
.article dt { font-weight: 650; margin-top: 12px; }
.article dd { margin: 2px 0 0; color: #1d2747; }

/* UI labels as the app writes them. */
.ui {
  font-weight: 650;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05em .4em;
  box-decoration-break: clone;
}

.where {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.where > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
}
.where h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: .95rem;
}
.where h4::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--blue);
  mask: var(--icon) center / contain no-repeat;
}
.where .on-pc h4 { --icon: url("assets/guide/computer.svg"); }
.where .on-phone h4 { --icon: url("assets/guide/phone.svg"); }
.where ol, .where ul { margin: 6px 0 0; }

.tip, .note {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 14px;
  border-left: 4px solid var(--mint);
  background: rgb(22 199 154 / 9%);
}
.note { border-left-color: var(--coral); background: rgb(255 91 58 / 8%); }
.tip p, .note p { margin: 0; }

figure {
  margin: 20px 0;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
figure svg { display: block; width: 100%; height: auto; }
figcaption { margin-top: 10px; font-size: .9rem; color: var(--ink-soft); }

table.grid { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
table.grid th, table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.grid th { font-weight: 650; }

/* Diagrams: one palette for every drawing. */
.dg text { font-family: "Inter", system-ui, sans-serif; font-size: 15px; fill: var(--ink); }
.dg .small { font-size: 13px; fill: var(--ink-soft); }
.dg .title { font-size: 17px; font-weight: 700; }
.dg .box { fill: var(--frost); stroke: var(--line); stroke-width: 1.5; }
.dg .link { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.dg .link-off { fill: none; stroke: #b7bfd3; stroke-width: 3; stroke-dasharray: 6 7; stroke-linecap: round; }
.dg .oneway { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; }
.dg .server-text { fill: var(--paper); font-size: 13px; font-weight: 650; }
.dg .wifi { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; }
.dg .group { fill: rgb(47 111 228 / 7%); stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 5; }
.dg .ok { fill: var(--mint); }
.dg .no { fill: var(--coral); }
.dg .num { fill: var(--blue); }
.dg .num-text { fill: var(--paper); font-size: 14px; font-weight: 700; }

@media (max-width: 900px) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--paper); }
}

/* Real captures of the apps. */
.shot { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.shot img { border: 1px solid var(--line); box-shadow: 0 12px 30px rgb(11 21 51 / 12%); }
.shot img.mobile { width: min(260px, 70%); border-radius: 26px; }
.shot img.wide { width: 100%; border-radius: 12px; }
.shot figcaption { flex-basis: 100%; text-align: center; }
