/* clausona site. One family (Recursive) for prose and code: its MONO axis turns the same
   letters into a monospace, the way one setup serves every account. Colour carries meaning:
   each account has its own hue, and everything shared between accounts is cobalt. */

:root {
  --paper: #ffffff;
  --paper-2: #f1f3f7;
  --ink: #1b2232;
  --ink-2: #4a5468;
  --rule: #d9dee7;
  --shared: #2d47c8;
  --shared-ink: #ffffff;
  --shared-soft: #e9edfc;
  --a1: #0e8c7e;
  --a2: #c02660;
  --a3: #a66a00;
  --sans: "Recursive", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141924;
    --paper-2: #1c2331;
    --ink: #e7eaf1;
    --ink-2: #a3acbd;
    --rule: #2c3445;
    --shared: #8ea2ff;
    --shared-ink: #10142a;
    --shared-soft: #20294a;
    --a1: #3cc9b7;
    --a2: #f06a9a;
    --a3: #e0a336;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-variation-settings:
    "MONO" 0,
    "CASL" 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

:lang(ko) body,
body:lang(ko) {
  font-family: "Recursive", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.75;
  word-break: keep-all;
}

a {
  color: var(--shared);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--shared);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
pre,
kbd,
.mono {
  font-family: var(--sans);
  font-variation-settings:
    "MONO" 1,
    "CASL" 0;
}

code {
  font-size: 0.92em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  white-space: nowrap;
}

pre {
  position: relative;
  margin: 1.25rem 0;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

pre .c {
  color: var(--ink-2);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.wordmark {
  font-variation-settings:
    "MONO" 1,
    "CASL" 1;
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

/* Hero */

.hero {
  display: grid;
  gap: 48px;
  padding: 64px 0 56px;
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    padding: 88px 0 72px;
  }
}

h1 {
  font-size: clamp(2.2rem, 1.3rem + 3vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-weight: 820;
  margin: 0 0 20px;
  max-width: 18ch;
  text-wrap: balance;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0;
}

.install {
  margin: 28px 0 0;
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.cmd {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}

.cmd-label {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--ink-2);
  padding: 8px 14px 0;
}

.cmd code {
  display: block;
  overflow-x: auto;
  padding: 4px 14px 10px;
  background: none;
  border: 0;
  font-size: 0.86rem;
  white-space: nowrap;
}

.copy {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 5px 10px;
  margin: 0 10px 8px 0;
  cursor: pointer;
}

pre .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}

.copy:hover {
  border-color: var(--ink-2);
}

.needs {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin: 12px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  font-weight: 650;
  font-size: 1rem;
  padding: 11px 18px;
  border-radius: 9px;
  text-decoration: none;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.btn:hover {
  border-color: var(--ink-2);
  text-decoration: none;
}

.btn-primary {
  background: var(--shared);
  border-color: var(--shared);
  color: var(--shared-ink);
}

.btn-primary:hover {
  filter: brightness(1.08);
  border-color: var(--shared);
}

/* The link diagram: accounts on the left, each its own colour, wired into the one shared
   setup on the right. The wires are an SVG stretched over the middle column; the account
   cells are equal thirds of that column's height, so each wire starts at a card's centre. */

.links {
  margin: 0;
}

.links-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.12fr);
}

.accounts {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
}

.accounts > li {
  list-style: none;
  display: flex;
  align-items: center;
  padding: 7px 0;
}

.accounts,
.shared ul {
  margin: 0;
  padding: 0;
}

.acct {
  width: 100%;
  border: 1px solid var(--rule);
  border-left: 5px solid var(--c);
  border-radius: 10px;
  background: var(--paper);
  padding: 11px 13px 12px;
}

.acct-name {
  font-variation-settings:
    "MONO" 1,
    "CASL" 0;
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--c);
}

.acct-mail {
  font-size: 0.82rem;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.acct-own {
  font-size: 0.78rem;
  color: var(--ink);
  margin-top: 6px;
}

.quota {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--ink-2);
  font-variation-settings:
    "MONO" 1,
    "CASL" 0;
}

.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--c);
}

.wires {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wires path {
  fill: none;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  transition: opacity 160ms ease;
}

.wires .w1 {
  stroke: var(--a1);
}

.wires .w2 {
  stroke: var(--a2);
}

.wires .w3 {
  stroke: var(--a3);
}

.links-grid:has(.accounts > li:nth-child(1):hover) .wires path:not(.w1),
.links-grid:has(.accounts > li:nth-child(2):hover) .wires path:not(.w2),
.links-grid:has(.accounts > li:nth-child(3):hover) .wires path:not(.w3) {
  opacity: 0.18;
}

@media (prefers-reduced-motion: no-preference) {
  .wires {
    animation: wire-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 250ms both;
  }
}

@keyframes wire-in {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.shared {
  border: 2px solid var(--shared);
  border-radius: 14px;
  background: var(--shared-soft);
  padding: 14px 16px 16px;
  align-self: center;
}

.shared-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.shared-dir {
  font-variation-settings:
    "MONO" 1,
    "CASL" 0;
  font-weight: 750;
  color: var(--shared);
}

.shared-note {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.shared li {
  list-style: none;
  display: grid;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  margin-top: 6px;
}

.shared li b {
  font-variation-settings:
    "MONO" 1,
    "CASL" 0;
  font-weight: 650;
  font-size: 0.88rem;
}

.shared li span {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.shared li.optional {
  border: 1.5px dashed var(--shared);
  background: transparent;
}

.links figcaption {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--ink-2);
  max-width: 60ch;
}

.join {
  display: none;
}

@media (max-width: 759px) {
  .links-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounts {
    grid-template-rows: none;
  }

  .accounts > li {
    padding: 5px 0;
  }

  .wires {
    display: none;
  }

  .join {
    display: block;
    width: 2px;
    height: 28px;
    margin: 4px auto;
    background: var(--shared);
  }
}

/* Sections */

.section {
  border-top: 1px solid var(--rule);
  padding: 64px 0;
}

h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 760;
  margin: 0 0 16px;
  max-width: 26ch;
  text-wrap: balance;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 32px 0 8px;
}

.prose {
  max-width: var(--measure);
}

.prose p,
.prose li {
  max-width: var(--measure);
}

.prose > p:first-of-type {
  margin-top: 0;
}

/* Who keeps what */

.table-scroll {
  overflow-x: auto;
  margin-top: 24px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.97rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--rule);
}

thead th {
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 600;
}

tbody th {
  font-weight: 650;
  width: 26%;
}

.is-shared {
  color: var(--shared);
  font-weight: 650;
}

.is-own {
  color: var(--ink);
}

td small {
  display: block;
  color: var(--ink-2);
  font-size: 0.85rem;
}

/* Steps: a real sequence, so it is numbered */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
  max-width: var(--measure);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  column-gap: 14px;
}

.steps li::before {
  content: counter(step);
  font-variation-settings:
    "MONO" 1,
    "CASL" 1;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--shared);
}

.steps pre {
  margin: 8px 0 0;
}

.steps p {
  margin: 0;
}

/* Feature list */

.features {
  display: grid;
  gap: 4px 48px;
  margin: 24px 0 0;
}

@media (min-width: 760px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.features div {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.features dt {
  font-weight: 700;
}

.features dd {
  margin: 4px 0 0;
  color: var(--ink-2);
}

/* Guides list */

.guide-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 2px;
  max-width: var(--measure);
}

.guide-list a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.08rem;
}

.guide-list a span {
  display: block;
  color: var(--ink-2);
  font-weight: 400;
  font-size: 0.95rem;
  margin-top: 2px;
}

.guide-list a:hover {
  text-decoration: underline;
}

/* FAQ */

.faq h3:first-child {
  margin-top: 8px;
}

.faq p {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink);
}

/* Articles */

.article {
  max-width: 74ch;
  padding: 48px 0 72px;
}

.crumbs {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.crumbs a {
  color: var(--ink-2);
}

.article h1 {
  max-width: 24ch;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
}

.article h2 {
  margin-top: 56px;
  max-width: none;
}

.article .lead {
  max-width: none;
}

.updated {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin: 14px 0 0;
}

.answer {
  margin: 32px 0;
  padding: 18px 22px;
  border-left: 5px solid var(--shared);
  background: var(--shared-soft);
  border-radius: 0 12px 12px 0;
}

.answer p {
  margin: 0;
}

.answer p + p,
.answer p + pre {
  margin-top: 10px;
}

.toc {
  margin: 0 0 8px;
  padding: 0 0 0 1.2em;
  color: var(--ink-2);
}

.toc a {
  color: var(--ink);
}

.article ul,
.article ol:not(.steps) {
  padding-left: 1.3em;
}

.article li + li {
  margin-top: 6px;
}

.warn {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--a3);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.warn p {
  margin: 0;
}

.cta {
  margin-top: 56px;
  padding: 24px;
  border: 2px solid var(--shared);
  border-radius: 14px;
}

.cta h2 {
  margin-top: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.site-footer p {
  margin: 0 0 6px;
  max-width: 80ch;
}

.site-footer a {
  color: var(--ink-2);
}

pre[data-copy] {
  padding-right: 84px;
}

.demo {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: #1a1a1a;
}

.table-scroll table {
  max-width: 900px;
}

.table-scroll + .prose {
  margin-top: 20px;
}

td code {
  white-space: normal;
}

@media (max-width: 759px) {
  table {
    min-width: 0;
  }

  .site-nav {
    gap: 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 759px) {
  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 40px 0 48px;
  }
}

@media (max-width: 759px) {
  p code,
  li code,
  dd code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.figure {
  margin: 32px 0;
}

.figure figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.light-line {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 1rem;
  color: var(--ink);
}
