/*
 * Rail Star: components
 * Every value comes from tokens.css. Load tokens.css first, then this file.
 */

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

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

body.rs {
  margin: 0;
  background: var(--rs-paper);
  color: var(--rs-ink);
  font-family: var(--rs-sans);
  font-size: var(--rs-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:where(.rs) a { color: inherit; }
.rs svg { max-width: 100%; }
.rs :focus-visible { outline: none; box-shadow: var(--rs-focus); }

/* ---------- App shell: fixed left rail + ruled main column ---------- */
.rs-app { display: grid; grid-template-columns: var(--rs-rail) minmax(0, 1fr); min-height: 100vh; }
.rs-main { border-left: var(--rs-rule); min-width: 0; }

.rs-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 16px 20px; }
.rs-rail__links { list-style: none; margin: 22px 0 0; padding: 0; font-size: 17px; line-height: 1.3; }
.rs-rail__links a { text-decoration: none; }
.rs-rail__links a:hover { color: var(--rs-magenta); }
.rs-rail__links a[aria-current] { text-decoration: underline; text-decoration-color: var(--rs-magenta); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rs-rail__foot { display: grid; gap: 10px; justify-items: start; }
.rs-rail .rs-rail__menu { display: none; }

@media (max-width: 860px) {
  .rs-app { grid-template-columns: 1fr; }
  .rs-main { border-left: 0; }
  .rs-rail { position: static; height: auto; flex-direction: row; align-items: center; padding: 14px 18px; border-bottom: var(--rs-rule); }
  .rs-rail__links, .rs-rail__foot { display: none; }
  .rs-rail .rs-rail__menu { display: inline-flex; }
}

/* Logo: lowercase wordmark with the asterisk tucked in */
.rs-logo { display: inline-flex; align-items: flex-start; gap: 2px; font-weight: 700; font-size: 30px; letter-spacing: -.03em; line-height: 1; color: var(--rs-magenta); text-decoration: none; }
.rs-logo svg { width: 14px; height: 14px; margin-top: 2px; }

/* The asterisk: six chunky arms, drawn in SVG */
.rs-asterisk { display: block; width: 100%; height: auto; }
.rs-asterisk line { stroke: var(--rs-magenta); stroke-width: 17; stroke-linecap: butt; }

/* ---------- Announcement bars ---------- */
.rs-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--rs-pad); background: var(--rs-cobalt); color: var(--rs-paper); font-size: 16px; }
.rs-bar a { color: inherit; }
.rs-bar--rose { background: var(--rs-rose); color: var(--rs-ink); }
.rs-bar__close { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; flex: none; }

/* ---------- Controls row: rose pills with ink outlines ---------- */
.rs-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 16px var(--rs-pad); }
.rs-select, .rs-search { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; border: var(--rs-rule); border-radius: var(--rs-radius-pill); background: var(--rs-rose); font: 400 15px var(--rs-sans); color: var(--rs-ink); }
.rs-select { min-width: 170px; justify-content: space-between; cursor: pointer; }
.rs-search { flex: 1 1 260px; }
.rs-search input { border: 0; background: transparent; font: inherit; color: inherit; width: 100%; outline: none; }
.rs-search input::placeholder { color: var(--rs-ink); }
.rs-select svg, .rs-search svg { width: 16px; height: 16px; flex: none; }
.rs-select path, .rs-search path, .rs-search circle { stroke: var(--rs-ink); fill: none; stroke-width: 1.6; }

/* ---------- Buttons: outlined pills ---------- */
.rs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: var(--rs-rule); border-radius: var(--rs-radius-pill); background: var(--rs-paper); color: var(--rs-ink); font: 500 16px var(--rs-sans); line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s var(--rs-ease), color .15s var(--rs-ease); }
.rs-btn:hover { background: var(--rs-rose-soft); }
.rs-btn--rose { background: var(--rs-rose); }
.rs-btn--rose:hover { background: var(--rs-magenta); color: var(--rs-paper); }
.rs-btn--ink { background: var(--rs-ink); color: var(--rs-paper); }
.rs-btn--ink:hover { background: var(--rs-cobalt); border-color: var(--rs-cobalt); color: var(--rs-paper); }
.rs-btn--lg { padding: 13px 26px; font-size: 18px; }
.rs-btn--block { display: flex; width: 100%; }
.rs-btn svg { width: 16px; height: 16px; }
.rs-btn path { stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Type ---------- */
.rs-intro { display: grid; grid-template-columns: minmax(0, 1fr) clamp(110px, 14vw, 180px); gap: var(--rs-pad); align-items: start; padding: 24px var(--rs-pad) 0; }
.rs-display { font-size: var(--rs-text-display); font-weight: 400; line-height: 1.22; letter-spacing: -.015em; margin: 0; max-width: 24ch; }
.rs-h1 { font-size: var(--rs-text-h1); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; margin: 0; }
.rs-h2 { font-size: var(--rs-text-h2); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.rs-h3 { font-size: var(--rs-text-h3); font-weight: 700; line-height: 1.3; margin: 0; }
.rs-lead { font-size: 20px; line-height: 1.5; color: var(--rs-ink); margin: 18px 0 0; max-width: 40ch; }
.rs-soft { color: var(--rs-soft); }
.rs-hl { color: var(--rs-magenta); }
.rs-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rs-link:hover { color: var(--rs-magenta); }
.rs-tag { display: inline-block; font-family: var(--rs-mono); font-size: var(--rs-text-caption); text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: var(--rs-radius-pill); background: var(--rs-rose-soft); }
.rs-tag--cobalt { background: var(--rs-cobalt-soft); }
@media (max-width: 600px) { .rs-intro { grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; } }

/* ---------- Blocks: everything sits in ruled blocks with a caption ---------- */
.rs-block { padding: var(--rs-block) var(--rs-pad); border-bottom: var(--rs-rule); }
.rs-block--tight { padding-top: 28px; padding-bottom: 28px; }
.rs-block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.rs-caption { display: block; font-size: var(--rs-text-caption); line-height: 1.4; color: var(--rs-ink); padding: 18px var(--rs-pad) 10px; }
.rs-ruled-top { border-top: var(--rs-rule); }

/* Drawn artwork panel (stands in for photos) */
.rs-art { display: block; width: 100%; height: auto; border-top: var(--rs-rule); border-bottom: var(--rs-rule); background: var(--rs-well); }
.rs-art .a-ink { fill: var(--rs-ink); }
.rs-art .a-rose { fill: var(--rs-rose); }
.rs-art .a-magenta { fill: var(--rs-magenta); }
.rs-art .a-cobalt { fill: var(--rs-cobalt); }
.rs-art .a-clay { fill: var(--rs-clay); }
.rs-art .a-moss { fill: var(--rs-moss); }
.rs-art .a-paper { fill: var(--rs-paper); }
.rs-art .a-line { fill: none; stroke: var(--rs-ink); stroke-width: 2; }

/* ---------- Cells: a grid split by ink rules ---------- */
.rs-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rs-ink); border-bottom: var(--rs-rule); }
.rs-cells--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rs-cells--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rs-cell { background: var(--rs-paper); padding: 28px var(--rs-pad) 32px; min-width: 0; }
.rs-cell p { margin: 10px 0 0; color: var(--rs-soft); }
.rs-cell__num { font-family: var(--rs-mono); font-size: var(--rs-text-caption); display: flex; align-items: center; min-height: 22px; margin-bottom: 14px; }
.rs-cell--rose { background: var(--rs-rose-soft); }
.rs-cell a.rs-h3 { text-decoration: none; }
.rs-cell a.rs-h3:hover { color: var(--rs-magenta); }
@media (max-width: 960px) { .rs-cells--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rs-cells, .rs-cells--2, .rs-cells--4 { grid-template-columns: 1fr; } }

/* Star list: magenta asterisks as bullets */
.rs-stars { list-style: none; padding: 0; margin: 18px 0 0; }
.rs-stars li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.rs-stars li::before { content: "*"; position: absolute; left: 0; top: -3px; color: var(--rs-magenta); font-weight: 700; font-size: 24px; line-height: 1.2; }

/* Schedule rows */
.rs-rows { list-style: none; margin: 0; padding: 0; border-top: var(--rs-rule); }
.rs-rows li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: var(--rs-rule-soft); }
.rs-rows time { font-family: var(--rs-mono); font-size: var(--rs-text-small); }
@media (max-width: 600px) { .rs-rows li { grid-template-columns: 1fr auto; } .rs-rows time { grid-column: 1 / -1; } }

/* ---------- Pricing ---------- */
.rs-toggle { display: inline-flex; border: var(--rs-rule); border-radius: var(--rs-radius-pill); overflow: hidden; }
.rs-toggle button { border: 0; background: var(--rs-paper); padding: 9px 18px; font: 500 15px var(--rs-sans); cursor: pointer; white-space: nowrap; color: var(--rs-ink); }
.rs-toggle button + button { border-left: var(--rs-rule); }
.rs-toggle button[aria-pressed="true"] { background: var(--rs-rose); }
.rs-plan { display: flex; flex-direction: column; }
.rs-plan__price { font-size: 52px; font-weight: 500; letter-spacing: -.04em; line-height: 1; margin-top: 22px; }
.rs-plan__price small { font-size: 15px; letter-spacing: 0; color: var(--rs-soft); font-weight: 400; }
.rs-plan .rs-stars { flex: 1; margin-bottom: 26px; }

.rs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rs-table th, .rs-table td { text-align: left; padding: 12px 10px; border-bottom: var(--rs-rule-soft); }
.rs-table thead th { border-bottom: var(--rs-rule); font-weight: 700; }
.rs-table-wrap { overflow-x: auto; }

.rs-faq details { border-bottom: var(--rs-rule-soft); padding: 16px 0; }
.rs-faq details:first-child { border-top: var(--rs-rule); }
.rs-faq summary { cursor: pointer; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.rs-faq summary::-webkit-details-marker { display: none; }
.rs-faq summary::after { content: "*"; color: var(--rs-magenta); font-weight: 700; font-size: 26px; line-height: .9; transition: transform .2s var(--rs-ease); }
.rs-faq details[open] summary::after { transform: rotate(30deg); }
.rs-faq p { margin: 10px 0 0; color: var(--rs-soft); max-width: 60ch; }

/* ---------- Article ---------- */
.rs-article-head { padding: var(--rs-block) var(--rs-pad) 32px; border-bottom: var(--rs-rule); }
.rs-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: var(--rs-text-small); }
.rs-prose { max-width: var(--rs-measure); padding: 40px var(--rs-pad) var(--rs-block); font-size: 19px; line-height: 1.65; }
.rs-prose h2 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin: 44px 0 12px; }
.rs-prose p { margin: 0 0 20px; }
.rs-prose a { text-decoration: underline; text-underline-offset: 3px; }
.rs-prose a:hover { color: var(--rs-magenta); }
.rs-prose blockquote { margin: 32px 0; padding: 0 0 0 44px; position: relative; font-size: 26px; line-height: 1.3; letter-spacing: -.015em; }
.rs-prose blockquote::before { content: "*"; position: absolute; left: 0; top: -8px; color: var(--rs-magenta); font-size: 64px; font-weight: 700; line-height: 1; }
.rs-recipe { background: var(--rs-well); border: var(--rs-rule); border-radius: 18px; padding: 20px 22px; margin: 28px 0; font-size: 16px; }
.rs-recipe .rs-tag { margin-bottom: 10px; }
.rs-recipe ol { margin: 8px 0 0; padding-left: 20px; }
.rs-code { font-family: var(--rs-mono); font-size: 14px; background: var(--rs-well); padding: 2px 6px; border-radius: 6px; }

/* ---------- Forms ---------- */
.rs-form { max-width: 560px; }
.rs-field { margin-bottom: 18px; }
.rs-label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.rs-input, .rs-textarea { width: 100%; padding: 11px 18px; border: var(--rs-rule); border-radius: var(--rs-radius-field); background: var(--rs-paper); font: 400 17px var(--rs-sans); color: var(--rs-ink); }
.rs-textarea { min-height: 110px; resize: vertical; }
.rs-input::placeholder, .rs-textarea::placeholder { color: var(--rs-faint); }
.rs-hint { font-size: 13px; color: var(--rs-soft); margin-top: 6px; }
.rs-choices { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0 0 18px; }
.rs-choices legend { font-size: 15px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.rs-choice { position: relative; }
.rs-choice input { position: absolute; opacity: 0; inset: 0; }
.rs-choice span { display: inline-block; padding: 8px 16px; border: var(--rs-rule); border-radius: var(--rs-radius-pill); font-size: 15px; cursor: pointer; white-space: nowrap; }
.rs-choice input:checked + span { background: var(--rs-rose); }
.rs-choice input:focus-visible + span { box-shadow: var(--rs-focus); }
.rs-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 6px 0 22px; }
.rs-check input { width: 18px; height: 18px; accent-color: var(--rs-magenta); margin-top: 2px; flex: none; }

/* ---------- Footer ---------- */
.rs-footer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rs-ink); font-size: var(--rs-text-small); }
.rs-footer > div { background: var(--rs-paper); padding: 28px var(--rs-pad) 40px; }
.rs-footer h4 { font-family: var(--rs-mono); font-weight: 500; font-size: var(--rs-text-caption); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; }
.rs-footer ul { list-style: none; padding: 0; margin: 0; }
.rs-footer li { margin-bottom: 6px; }
.rs-footer a { text-decoration: none; }
.rs-footer a:hover { color: var(--rs-magenta); }
@media (max-width: 760px) { .rs-footer { grid-template-columns: 1fr 1fr; } }

/* ---------- Motion: the asterisk turns once on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rs-spin { animation: rs-spin 1.4s var(--rs-ease) both; transform-origin: 50% 50%; }
}
@keyframes rs-spin { from { transform: rotate(-60deg) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
