:root {
  --ink: #171717;
  --muted: #646464;
  --line: #d9d9d9;
  --orange: #ed6a1c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", "BIZ UDPGothic", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
  line-break: strict;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover { color: var(--orange); }

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  width: auto;
  height: auto;
  margin: 0;
  padding: .45rem .8rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  background: #fff;
  border: 1px solid var(--ink);
}

.site-header,
main,
footer {
  width: min(900px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 26px 0;
}

.site-name {
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.4rem;
  font-size: .92rem;
}

nav a { text-decoration: none; }

main { padding-bottom: 64px; }

section {
  padding: 32px 0;
  scroll-margin-top: 20px;
}

.intro {
  padding-top: 38px;
  padding-bottom: 42px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 16em;
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.35;
  letter-spacing: -.025em;
}

.summary {
  max-width: 45em;
  margin: 18px 0 22px;
  text-wrap: pretty;
}

.alias-example {
  display: grid;
  grid-template-columns: minmax(100px, .6fr) auto minmax(0, 2fr);
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  margin: 24px 0 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.alias-input,
.alias-output {
  display: grid;
  gap: 1px;
  font-weight: 700;
}

.alias-example small {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 500;
}

.alias-arrow,
.number {
  color: var(--orange);
}

.alias-output code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 30px;
}

.install-link {
  padding: 9px 15px;
  color: #fff;
  background: var(--orange);
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
}

.install-link:hover {
  color: #fff;
  background: #cf5510;
}

.text-link {
  font-weight: 650;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

h2 {
  margin: 0 0 24px;
  font-size: 1.55rem;
  line-height: 1.5;
  letter-spacing: -.015em;
}

h3 {
  margin: 0;
  font-size: 1.02rem;
}

p { margin: 0 0 18px; }

.flow,
.setup-steps,
.document-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow { max-width: 700px; }

.flow li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: .7rem;
  padding: 5px 0 24px;
  position: relative;
}

.flow li:not(:last-child)::after {
  content: "↓";
  position: absolute;
  bottom: 2px;
  left: .65rem;
  color: var(--orange);
  font-weight: 700;
}

.number {
  padding-top: .18rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  font-weight: 800;
}

.flow p {
  margin: 1px 0;
  color: var(--muted);
  text-wrap: pretty;
}

.flow-notes {
  max-width: calc(700px - 3.1rem);
  margin: 8px 0 0 3.1rem;
  padding: .85rem 0;
  border-block: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: .92rem;
  text-wrap: pretty;
}

.flow-notes li + li { margin-top: .4rem; }

.setup-intro {
  max-width: 45em;
  text-wrap: pretty;
}

.setup-steps {
  max-width: 720px;
  margin-bottom: 18px;
}

.setup-steps li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: .7rem;
  padding: 11px 0 17px;
}

.setup-steps p {
  margin: 2px 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.setup-steps code { white-space: nowrap; }

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 9px;
}

.inline-actions a {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--orange);
  border-radius: 7px;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.inline-actions a:hover {
  color: #fff;
  background: var(--orange);
}

.document-links li {
  display: grid;
  grid-template-columns: minmax(10rem, .65fr) 1.35fr;
  gap: 1rem;
  margin: 8px 0;
}

.document-links a {
  text-decoration: none;
}

.document-links a:hover {
  text-decoration: underline;
}

.document-links li > span {
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .site-header {
    padding: 20px 0;
  }

  main { padding-bottom: 40px; }

  section { padding: 34px 0; }

  .intro {
    padding-top: 30px;
    padding-bottom: 36px;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .alias-example {
    grid-template-columns: 1fr;
    gap: .45rem;
  }

  .alias-arrow { transform: rotate(90deg); width: max-content; }

  .document-links li { grid-template-columns: 1fr; gap: 0; margin-bottom: 13px; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.site-name { display: flex; align-items: center; gap: 8px; }
.site-name img { flex-shrink: 0; }

/* Shared navigation and policy layouts. */
.site-header, footer { flex-wrap: wrap; gap: 16px; }
nav { flex-wrap: wrap; gap: .7rem 1.4rem; }
.policy { max-width: 760px; }
.policy section { padding: 24px 0; }
.policy h2 { margin-bottom: 14px; }
.policy li + li { margin-top: 12px; }
.policy p, .policy li { overflow-wrap: anywhere; }
