/*
 * Market Day: components. Every value comes from tokens.css; load it first.
 * Prefix: md-. Put class="md" on <body>.
 */

/* Base */
.md { margin: 0; background: var(--md-paper); color: var(--md-ink); font-family: var(--md-sans); font-size: var(--md-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.md *, .md *::before, .md *::after { box-sizing: border-box; }
.md img, .md svg { max-width: 100%; display: block; }
:where(.md) a { color: inherit; }
.md-container { width: min(100% - 40px, var(--md-container)); margin-inline: auto; }
.md-narrow { width: min(100% - 40px, var(--md-narrow)); margin-inline: auto; }
.md-center { text-align: center; }
.md-center .md-lead { margin-inline: auto; }
.md-clip { overflow-x: clip; }

/* Sections */
.md-section { padding-block: var(--md-section); }
.md-section--butter { background: var(--md-butter); }
.md-section--mustard { background: var(--md-mustard); }
.md-section--ink { background: var(--md-night); color: var(--md-paper); }
.md-section--ink .md-lead { color: rgba(255, 252, 243, .72); }

/* Type: chunky serif headlines, one italic word per heading; sans for everything else */
.md-hero-title, .md-h2, .md-h3 { margin: 0; font-family: var(--md-serif); font-weight: 400; color: inherit; }
.md-hero-title { font-size: var(--md-text-hero); letter-spacing: var(--md-tracking-hero); line-height: 1; }
.md-h2 { font-size: var(--md-text-h2); letter-spacing: -.015em; line-height: 1.05; }
.md-h3 { font-size: var(--md-text-h3); line-height: 1.15; }
.md-accent { position: relative; display: inline-block; font-style: italic; white-space: nowrap; }
.md-accent::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: -.08em; height: .22em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M3 11 C 40 2, 70 15, 105 7 S 170 3, 197 9' fill='none' stroke='%23e2553d' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.md-accent--plain::after { display: none; }
.md-lead { max-width: 580px; margin: 22px 0 0; color: var(--md-ink-soft); font-size: var(--md-text-lead); line-height: 1.55; }
.md-eyebrow { display: inline-block; margin-bottom: 16px; font-size: var(--md-text-micro); font-weight: 700; letter-spacing: var(--md-tracking-caps); text-transform: uppercase; }
.md-muted { color: var(--md-ink-soft); }
.md-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--md-mustard-deep); }
.md-link:hover { text-decoration-color: var(--md-tomato); }

/* Announcement bar: one ink line on top */
.md-announce { display: block; padding: 11px 16px; background: var(--md-ink); color: var(--md-paper); font-size: 14px; text-align: center; text-decoration: none; }
.md-announce u { text-decoration-color: var(--md-mustard); text-underline-offset: 3px; }

/* Nav: white bar with a hairline, logo left, links, then a mustard and an outline pill */
.md-nav { position: relative; z-index: 5; background: var(--md-white); border-bottom: var(--md-border); }
.md-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.md-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--md-serif); font-size: 26px; line-height: 1; text-decoration: none; }
.md-logo__mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border: var(--md-outline); border-radius: 50%; background: var(--md-mustard); }
.md-logo__mark svg { width: 22px; height: 22px; }
.md-nav__links { display: flex; gap: 28px; margin-right: auto; margin-left: 24px; font-size: 15px; font-weight: 600; }
.md-nav__links a { text-decoration: none; }
.md-nav__links a:hover, .md-nav__links a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--md-mustard-deep); }
.md-nav__end { display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .md-nav__links, .md-nav .md-nav__hide { display: none; } }

/* Buttons: pills. Ink for the main action on mustard, mustard for the main action on paper */
.md-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border: var(--md-outline); border-radius: var(--md-radius-pill); font-family: var(--md-sans); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .2s var(--md-ease), box-shadow .2s var(--md-ease), background .2s; }
.md-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--md-drop); }
.md-btn--primary { background: var(--md-mustard); color: var(--md-ink); }
.md-btn--ink { background: var(--md-ink); color: var(--md-paper); }
.md-btn--ink:hover { box-shadow: 4px 4px 0 var(--md-white); }
.md-btn--outline { background: transparent; color: var(--md-ink); }
.md-btn--light { border-color: var(--md-paper); background: var(--md-paper); color: var(--md-ink); }
.md-btn--sm { padding: 9px 18px; font-size: 14px; }
.md-btn--block { width: 100%; }
.md-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.md-center .md-actions { justify-content: center; }

/* Badges and stickers */
.md-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: var(--md-outline); border-radius: var(--md-radius-pill); background: var(--md-white); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.md-badge--tomato { border-color: var(--md-tomato); background: var(--md-tomato); color: var(--md-white); }
.md-badge--leaf { border-color: var(--md-leaf); background: var(--md-leaf-soft); color: var(--md-leaf); }
.md-sticker { position: absolute; display: grid; place-items: center; width: 108px; height: 108px; padding: 14px; border: var(--md-outline); border-radius: 50%; background: var(--md-tomato); color: var(--md-white); font-family: var(--md-serif); font-size: 19px; line-height: 1.05; text-align: center; transform: rotate(-10deg); }
.md-doodle { position: absolute; pointer-events: none; }
.md-doodle svg { width: 100%; height: auto; }

/* Hero: the solid mustard field */
.md-hero { position: relative; overflow: hidden; background: var(--md-mustard); padding: clamp(56px, 8vw, 104px) 0 0; }
.md-hero .md-lead { color: var(--md-ink); }
.md-hero__body { position: relative; z-index: 1; text-align: center; }
.md-hero__body .md-lead { margin-inline: auto; }
.md-hero__body .md-actions { justify-content: center; }
.md-hero__art { position: relative; width: min(100%, 980px); margin: 48px auto 0; }
.md-hero__art svg { width: 100%; height: auto; }

/* Rating: scribbled stars and a small line of proof */
.md-rating { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; font-size: 14px; font-weight: 500; }
.md-stars { display: inline-flex; gap: 3px; }
.md-stars svg { width: 20px; height: 20px; }

/* Logos strip: names set in type, never real marks */
.md-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; color: var(--md-ink-soft); font-family: var(--md-serif); font-size: 24px; }

/* Section head */
.md-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 44px; }

/* Cards: white, firm ink outline, rounded; lift with a hard drop on hover */
.md-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.md-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-white); transition: transform .2s var(--md-ease), box-shadow .2s var(--md-ease); }
a.md-card { text-decoration: none; }
a.md-card:hover { transform: translate(-3px, -3px); box-shadow: var(--md-drop-lg); }
.md-card p { margin: 10px 0 0; color: var(--md-ink-soft); }
.md-card__art { display: grid; place-items: center; height: 150px; margin: -8px -8px 22px; border-radius: calc(var(--md-radius) - 8px); background: var(--md-butter); }
.md-card__art svg { width: 120px; height: 120px; }
.md-card__art--tomato { background: var(--md-tomato-soft); }
.md-card__art--leaf { background: var(--md-leaf-soft); }
.md-card__art--sky { background: var(--md-sky); }
@media (max-width: 900px) { .md-cards { grid-template-columns: 1fr; } }

/* Split: text next to a big illustrated tile */
.md-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.md-split__tile { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; border: var(--md-outline); border-radius: var(--md-radius-lg); background: var(--md-mustard); }
.md-split__tile svg { width: 72%; height: auto; }
@media (max-width: 900px) { .md-split { grid-template-columns: 1fr; } }

/* Steps: numbered circles */
.md-steps-list { display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; }
.md-steps-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; counter-increment: step; }
.md-steps-list li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border: var(--md-outline); border-radius: 50%; background: var(--md-white); font-family: var(--md-serif); font-size: 22px; }
.md-steps-list strong { display: block; font-size: 18px; }
.md-steps-list span { color: var(--md-ink-soft); }

/* Stats */
.md-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.md-stat { padding-top: 18px; border-top: var(--md-outline); }
.md-stat__num { font-family: var(--md-serif); font-size: clamp(44px, 5vw, 64px); line-height: 1; }
.md-stat p { margin: 8px 0 0; color: var(--md-ink-soft); }
.md-section--ink .md-stat { border-top-color: var(--md-mustard); }
.md-section--ink .md-stat p { color: rgba(255, 252, 243, .72); }
@media (max-width: 700px) { .md-stats { grid-template-columns: 1fr; } }

/* Quote */
.md-quote { margin: 0; font-family: var(--md-serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; }
.md-byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; font-size: 15px; }
.md-byline strong { display: block; }
.md-avatar { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 auto; border: var(--md-outline); border-radius: 50%; background: var(--md-tomato-soft); font-family: var(--md-serif); font-size: 22px; color: var(--md-ink); }

/* Toggle */
.md-segment { display: inline-flex; padding: 4px; border: var(--md-outline); border-radius: var(--md-radius-pill); background: var(--md-white); }
.md-segment button { padding: 9px 20px; border: 0; border-radius: var(--md-radius-pill); background: transparent; color: var(--md-ink); font: 600 15px/1.2 var(--md-sans); white-space: nowrap; cursor: pointer; }
.md-segment button[aria-pressed="true"] { background: var(--md-ink); color: var(--md-paper); }

/* Pricing */
.md-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.md-plan { position: relative; display: flex; flex-direction: column; padding: 32px 28px; border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-white); }
.md-plan--featured { background: var(--md-butter); box-shadow: var(--md-drop-lg); }
.md-plan--featured .md-badge { position: absolute; top: -15px; left: 28px; }
.md-plan__name { margin: 0; font-family: var(--md-serif); font-size: 28px; font-weight: 400; }
.md-plan__price { margin: 18px 0 4px; font-family: var(--md-serif); font-size: 56px; line-height: 1; }
.md-plan__price small { font-family: var(--md-sans); font-size: 15px; color: var(--md-ink-soft); }
.md-plan__note { margin: 0 0 22px; color: var(--md-ink-soft); font-size: 15px; }
.md-plan .md-btn { margin-top: auto; }
.md-checks { display: grid; gap: 10px; margin: 0 0 28px; padding: 22px 0 0; border-top: 1px dashed var(--md-ink-faint); list-style: none; }
.md-checks li { position: relative; padding-left: 30px; }
.md-checks li::before { content: ""; position: absolute; top: 3px; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--md-leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5 8.5 13.5 14.5 7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
@media (max-width: 900px) { .md-plans { grid-template-columns: 1fr; } }

/* Compare table */
.md-table-wrap { overflow-x: auto; border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-white); }
.md-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.md-table th, .md-table td { padding: 14px 20px; border-bottom: var(--md-border); text-align: left; }
.md-table thead th { background: var(--md-butter); font-weight: 700; }
.md-table tr:last-child td { border-bottom: 0; }

/* FAQ */
.md-faq { display: grid; gap: 12px; }
.md-faq details { border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-white); }
.md-faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; font-size: 18px; font-weight: 600; list-style: none; cursor: pointer; }
.md-faq summary::-webkit-details-marker { display: none; }
.md-faq summary::after { content: "+"; font-family: var(--md-serif); font-size: 28px; line-height: .8; }
.md-faq details[open] summary::after { content: "\2212"; }
.md-faq details p { margin: 0; padding: 0 24px 22px; color: var(--md-ink-soft); }

/* Article */
.md-article-head { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); text-align: center; }
.md-article-head .md-lead { margin-inline: auto; }
.md-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 28px; color: var(--md-ink-soft); font-size: 14px; }
.md-meta .md-byline { margin: 0; color: var(--md-ink); }
.md-figure { margin-top: 0; margin-bottom: clamp(40px, 6vw, 64px); }
.md-figure__art { display: grid; place-items: center; aspect-ratio: 16 / 8; border: var(--md-outline); border-radius: var(--md-radius-lg); background: var(--md-mustard); overflow: hidden; }
.md-figure__art svg { width: 70%; height: auto; }
.md-figure figcaption { margin-top: 12px; color: var(--md-ink-soft); font-size: 14px; text-align: center; }
.md-prose { font-size: 18px; line-height: 1.7; }
.md-prose > p:first-child::first-letter { float: left; margin: 6px 12px 0 0; font-family: var(--md-serif); font-size: 76px; line-height: .8; color: var(--md-tomato); }
.md-prose h2 { margin: 48px 0 12px; font-family: var(--md-serif); font-size: 34px; font-weight: 400; line-height: 1.15; }
.md-prose p, .md-prose ul, .md-prose ol { margin: 0 0 22px; }
.md-prose li { margin-bottom: 8px; }
.md-prose li::marker { color: var(--md-tomato); font-weight: 700; }
.md-prose blockquote { margin: 36px 0; padding: 28px 30px; border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-butter); font-family: var(--md-serif); font-size: 26px; line-height: 1.25; }
.md-note { display: flex; gap: 14px; margin: 32px 0; padding: 20px 22px; border-radius: var(--md-radius); background: var(--md-leaf-soft); font-size: 16px; }
.md-note strong { color: var(--md-leaf); }

/* Forms */
.md-form { display: grid; gap: 18px; }
.md-field { display: grid; gap: 7px; }
.md-label { font-size: 14px; font-weight: 600; }
.md-input, .md-select { width: 100%; padding: 13px 16px; border: var(--md-outline); border-radius: var(--md-radius-sm); background: var(--md-white); color: var(--md-ink); font: 400 16px/1.4 var(--md-sans); }
.md-input::placeholder { color: var(--md-ink-faint); }
.md-input:focus, .md-select:focus { outline: none; box-shadow: 0 0 0 4px var(--md-mustard); }
.md-hint { color: var(--md-ink-soft); font-size: 13px; }
.md-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.md-check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--md-ink); }
.md-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.md-choice { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 8px 14px; border: var(--md-outline); border-radius: var(--md-radius); background: var(--md-white); font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; }
.md-choice svg { width: 40px; height: 40px; }
.md-choice input { position: absolute; opacity: 0; }
.md-choice:has(input:checked) { background: var(--md-mustard); box-shadow: var(--md-drop); }
.md-choice:has(input:focus-visible) { outline: 3px solid var(--md-tomato); outline-offset: 2px; }
.md-panel { padding: clamp(24px, 4vw, 40px); border: var(--md-outline); border-radius: var(--md-radius-lg); background: var(--md-white); box-shadow: var(--md-drop-lg); }
.md-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.md-steps span { width: 34px; height: 8px; border-radius: var(--md-radius-pill); background: var(--md-line); }
.md-steps span[aria-current] { background: var(--md-ink); }
.md-subscribe { display: flex; gap: 8px; max-width: 460px; }
.md-subscribe .md-input { border-radius: var(--md-radius-pill); }
@media (max-width: 480px) { .md-choices { grid-template-columns: 1fr; } .md-subscribe { flex-direction: column; } }

/* Footer */
.md-footer { padding: 72px 0 32px; background: var(--md-night); color: var(--md-paper); }
.md-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.md-footer__title { margin: 0 0 14px; color: var(--md-mustard); font-size: 13px; font-weight: 700; letter-spacing: var(--md-tracking-caps); text-transform: uppercase; }
.md-footer ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.md-footer a { text-decoration: none; opacity: .85; }
.md-footer a:hover { opacity: 1; text-decoration: underline; }
.md-footer .md-logo__mark { border-color: var(--md-paper); }
.md-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 252, 243, .18); color: rgba(255, 252, 243, .6); font-size: 14px; }
@media (max-width: 800px) { .md-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .md-footer__grid { grid-template-columns: 1fr; } }

/* Illustration helpers: ink outlines and flat fills for inline SVG drawings */
.md-art { stroke: var(--md-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.md-art .ln, .md-art.ln { fill: none; }
.md-art .f-paper { fill: var(--md-paper); }
.md-art .f-white { fill: var(--md-white); }
.md-art .f-mustard { fill: var(--md-mustard); }
.md-art .f-deep { fill: var(--md-mustard-deep); }
.md-art .f-butter { fill: var(--md-butter); }
.md-art .f-tomato { fill: var(--md-tomato); }
.md-art .f-tomato-soft { fill: var(--md-tomato-soft); }
.md-art .f-leaf { fill: var(--md-leaf); }
.md-art .f-leaf-soft { fill: var(--md-leaf-soft); }
.md-art .f-sky { fill: var(--md-sky); }
.md-art .f-ink { fill: var(--md-ink); }
.md-art .f-night { fill: var(--md-night); }
.md-art text { stroke: none; font-family: var(--md-serif); }
.md-art .t-ink { fill: var(--md-ink); }
.md-art .t-paper { fill: var(--md-paper); }
