/* Muslin support site. Matches the theme: off-white paper, ink, one red accent, hairlines, ruler ticks. */
:root { --paper: #F3F1EA; --ink: #121212; --mute: #5C5B55; --rule: #D8D4C8; --tint: #E6E3D8; --accent: #C8381C; }
html { scroll-padding-top: 96px; }
body { font-size: 15px; line-height: 1.6; font-variant-numeric: tabular-nums; }
main:focus { outline: none; }
body h1, body h2, body h3, body h4 { font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: -0.03em; line-height: 1.08; margin: 0; font-weight: 600; }
a { text-underline-offset: 0.2em; }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--paper); }

.label { font-family: 'Space Mono', ui-monospace, monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mute); }
.idx { font-family: 'Space Mono', monospace; font-size: 0.45em; color: var(--mute); margin-right: 0.8em; vertical-align: 0.35em; letter-spacing: 0; }

.nav-link { font-family: 'Space Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 12px; text-decoration: none; position: relative; }
.nav-link:hover, .nav-link.is-current { color: var(--accent); }
.nav-link.is-current::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--accent); }
.link-line { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.menu-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); background: transparent; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); font-family: 'Space Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; cursor: pointer; background: transparent; color: var(--ink); transition: background .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost-light { border-color: var(--paper); color: var(--paper); }
.btn-ghost-light:hover { background: var(--paper); color: var(--ink); }

/* Ruler ticks, the theme's signature motif */
@property --drift { syntax: '<length>'; inherits: false; initial-value: 0px; }
@keyframes drift { to { --drift: 40px; } }
.ruler { height: 16px; background-image: repeating-linear-gradient(90deg, rgba(243,241,234,.55) 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, rgba(243,241,234,.9) 0 1px, transparent 1px 40px); background-size: 100% 8px, 100% 16px; background-repeat: no-repeat; background-position: var(--drift) 100%, var(--drift) 100%; }
.ruler-dark { height: 16px; background-image: repeating-linear-gradient(90deg, rgba(18,18,18,.35) 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, rgba(18,18,18,.8) 0 1px, transparent 1px 40px); background-size: 100% 8px, 100% 16px; background-repeat: no-repeat; background-position: var(--drift) 0, var(--drift) 0; }
@media (prefers-reduced-motion: no-preference) { .ruler, .ruler-dark { animation: drift 6s linear infinite; } }
.foot-link { color: rgba(243,241,234,.85); text-decoration: none; }
.foot-link:hover { color: #fff; text-decoration: underline; }

/* Cards */
.card { border: 1px solid var(--ink); background: transparent; padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: background .15s, transform .15s; min-height: 190px; }
.card:hover { background: #fff; }
.card .arrow { margin-top: auto; font-family: 'Space Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.spec { border-top: 1px solid var(--ink); }
.spec-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.spec-row dt { font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); padding-top: 3px; }
.spec-row dd { margin: 0; }

/* Hero readout (annotated measurement strip) */
.readout { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--ink); font-family: 'Space Mono', monospace; font-size: 12px; background: transparent; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Documentation prose */
.prose-doc { max-width: 760px; }
.prose-doc h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 56px 0 14px; padding-top: 18px; border-top: 1px solid var(--ink); }
.prose-doc h2:first-child { margin-top: 0; }
.prose-doc h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.prose-doc p, .prose-doc li { color: #26251f; }
.prose-doc ul, .prose-doc ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose-doc li { margin: 4px 0; }
.prose-doc code { font-family: 'Space Mono', monospace; font-size: .85em; background: var(--tint); padding: 1px 6px; }
.prose-doc table { width: 100%; border-collapse: collapse; margin: 14px 0 24px; font-size: 14px; display: block; overflow-x: auto; }
.prose-doc th { text-align: left; font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); border-bottom: 1px solid var(--ink); padding: 8px 12px 8px 0; white-space: nowrap; }
.prose-doc td { border-bottom: 1px solid var(--rule); padding: 10px 12px 10px 0; vertical-align: top; }
.callout { border-left: 3px solid var(--accent); background: #fff; padding: 14px 18px; margin: 18px 0; }
.callout strong { font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; display: block; margin-bottom: 4px; }
.toc a { display: block; padding: 7px 0 7px 14px; border-left: 1px solid var(--rule); text-decoration: none; font-size: 14px; color: var(--mute); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 13px; font-weight: 500; }
.doc-hidden { display: none !important; }
mark { background: #f3d9a4; color: inherit; }

/* FAQ accordion */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 20px 0; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: 'Space Mono', monospace; font-size: 20px; color: var(--accent); flex: none; }
.faq details[open] summary::after { content: '\2212'; }
.faq .answer { padding: 0 0 22px; max-width: 720px; color: #26251f; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Forms */
.field label, .field .lbl { display: block; font-family: 'Space Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.field .hint { font-size: 13px; color: var(--mute); margin-top: 6px; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; background: #fff; border: 1px solid var(--mute); border-radius: 0; font-size: 16px; }
textarea.input { min-height: 180px; resize: vertical; }
.input:focus { outline: none; border: 2px solid var(--ink); padding: 11px 13px; }
.input[aria-invalid="true"] { border-color: var(--accent); }
.err { color: #A52D16; font-size: 13px; margin-top: 6px; }
.dropzone { border: 1px dashed var(--ink); background: rgba(255,255,255,.6); padding: 22px; text-align: center; cursor: pointer; }
.dropzone.is-over { background: #fff; border-style: solid; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; list-style: none; padding: 0; }
.thumbs li { position: relative; border: 1px solid var(--rule); background: #fff; }
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.thumbs span { display: block; font-size: 11px; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { border: 1px solid var(--ink); padding: 16px 18px; background: #fff; }
.alert-error { border-color: var(--accent); }
.ticket { font-family: 'Space Mono', monospace; background: var(--ink); color: var(--paper); padding: 4px 10px; letter-spacing: .08em; }

/* Release notes */
.release { border-top: 1px solid var(--ink); padding: 28px 0 8px; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .release { grid-template-columns: 200px 1fr; gap: 32px; } }

@media (max-width: 640px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }

/* Pointer targets of at least 24px */
.foot-link { display: inline-block; padding: 3px 0; }
.toc a { min-height: 32px; }
[data-docs] > * { min-width: 0; }
@media (max-width: 1023px) { .toc a { border-left: 0; border-bottom: 1px solid var(--rule); padding: 6px 4px; flex: none; } .toc a.is-active { border-left: 0; border-bottom: 2px solid var(--accent); padding-left: 4px; } }

/* Tailwind's reset removes list markers; restore them where content is written as lists */
.prose-doc ul, .release ul, .faq .answer ul { list-style: disc; }
.prose-doc ol, .faq .answer ol { list-style: decimal; }
.prose-doc li::marker, .release li::marker { color: var(--accent); }
.prose-doc a, .faq .answer a, .release a, .callout a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.prose-doc a:hover { color: var(--accent); }

/* Demo store window */
.demo-dialog { border: 1px solid var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); background: var(--paper); color: var(--ink); margin: auto; overflow: auto; }
.demo-dialog::backdrop { background: rgba(18, 18, 18, .6); }
.demo-body { padding: 36px 28px 28px; }
.demo-close-wrap { position: absolute; top: 8px; right: 8px; margin: 0; }
.demo-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
.demo-close:hover { background: var(--ink); color: var(--paper); }
.demo-dialog .spec-row { grid-template-columns: 90px 1fr; }
@media (max-width: 480px) { .demo-body { padding: 56px 18px 22px; } .demo-dialog .spec-row { grid-template-columns: 1fr; } }
.nav-link { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
