/* Socle documentation and support site. Mirrors the theme's Stone preset. */
:root {
  --bg: #F3EFEE;
  --surface: #FFFFFF;
  --text: #141414;
  --muted: #6E6B6A;
  --line: #141414;
  --soft-line: #D9D3D1;
  --accent: #141414;
  --ui: 'Michroma', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 3vw, 28px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

.ui { font-family: var(--ui); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 18px var(--gutter); border-bottom: 1px solid var(--soft-line);
}
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav:last-child { justify-content: flex-end; }
.site-header a { text-decoration: none; }
.site-header a[aria-current="page"] { text-decoration: underline; }
.logo { font-family: var(--ui); letter-spacing: 0.34em; text-transform: uppercase; font-size: 13px; text-decoration: none; margin-right: -0.34em; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.hero { padding-block: clamp(48px, 9vw, 120px) clamp(32px, 5vw, 64px); }
.hero h1 { font: 400 clamp(2.4rem, 7vw, 5.5rem)/0.98 var(--ui); text-transform: uppercase; margin: 0.4rem 0 1.2rem; letter-spacing: -0.01em; }
.hero p { max-width: 40rem; margin: 0; color: var(--muted); font-size: 1.05rem; }

.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-bottom: 96px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { grid-template-columns: auto 1fr; }
  .site-header nav:first-child { display: none; }
}

article section { border-top: 1px solid var(--line); padding: 28px 0 40px; }
article h2 { font: 400 clamp(1.4rem, 3vw, 2rem)/1.1 var(--ui); text-transform: uppercase; margin: 0.6rem 0 1.2rem; }
article h3 { font: 400 13px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; margin: 1.8rem 0 0.6rem; }
article p, article li { max-width: 46rem; }
article ul, article ol { padding-left: 1.2rem; }
article li + li { margin-top: 0.35rem; }
kbd, code { font: 0.88em/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--soft-line); padding: 0.15em 0.4em; }
.path { font-family: var(--ui); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface); border: 1px solid var(--soft-line); padding: 0.2em 0.5em; white-space: nowrap; }
.note { background: var(--surface); border-left: 2px solid var(--line); padding: 14px 18px; max-width: 46rem; }
table { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--soft-line); vertical-align: top; }
th { font: 400 11px/1.4 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
details { border-bottom: 1px solid var(--soft-line); max-width: 46rem; }
details summary { cursor: pointer; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details summary::after { content: '+'; font-family: var(--ui); }
details[open] summary::after { content: '–'; }
details summary::-webkit-details-marker { display: none; }
details > div { padding-bottom: 16px; }

/* Support form */
.support { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); padding-bottom: 96px; }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } }
form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label { font: 400 11px/1.4 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
input, textarea, select {
  font: inherit; color: inherit; width: 100%;
  background: var(--surface); border: 1px solid var(--soft-line); border-radius: 0;
  padding: 12px 14px; min-height: 48px;
}
input:focus, textarea:focus, select:focus { border-color: var(--line); outline: none; box-shadow: 0 0 0 1px var(--line); }
textarea { min-height: 180px; resize: vertical; }
input[type="file"] { padding: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.button {
  justify-self: start; display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px;
  background: var(--text); color: var(--bg); border: 1px solid var(--text); border-radius: 0;
  font: 400 11px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.button:hover { background: transparent; color: var(--text); }
.button[disabled] { opacity: 0.5; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #9B1C1C; min-height: 1.2em; margin: 0; }
.policy h2 { font: 400 13px/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.8rem; }
.policy ul { padding-left: 1.1rem; }
.policy section + section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }

.site-footer { border-top: 1px solid var(--line); padding: 24px var(--gutter) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { text-decoration: none; }
