/*
 * Dog Ear: components
 * Needs tokens.css first. Every class starts with "de-" so it can sit next to any other CSS.
 */

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

/* Sections */
.de-section { padding-block: var(--de-section); }
.de-section--mist { background: var(--de-mist); }
.de-section--slate { background: var(--de-slate); color: var(--de-paper); }
.de-section--slate .de-lead { color: rgba(255, 255, 255, .7); }
.de-rule { height: 1px; border: 0; margin: 0; background: var(--de-line); }

/* Type: rounded humanist sans, bold headlines in soft charcoal */
.de-hero-title, .de-h2, .de-h3 { margin: 0; font-family: var(--de-sans); font-weight: 700; color: inherit; }
.de-hero-title { font-size: var(--de-text-hero); letter-spacing: var(--de-tracking-hero); line-height: 1.08; }
.de-h2 { font-size: var(--de-text-h2); letter-spacing: var(--de-tracking-h2); line-height: 1.15; }
.de-h3 { font-size: var(--de-text-h3); letter-spacing: -.01em; line-height: 1.3; }
.de-lead { max-width: 620px; margin: 16px 0 0; color: var(--de-ink); font-size: var(--de-text-lead); font-weight: 400; line-height: 1.4; }
.de-soft { color: var(--de-soft); }
.de-eyebrow { display: inline-block; margin-bottom: 12px; color: var(--de-radish); font-size: var(--de-text-small); font-weight: 700; letter-spacing: .02em; }
.de-mono { font-family: var(--de-mono); font-size: var(--de-text-micro); }

/* Signature 1: the hand-drawn aqua underline under one word */
.de-mark { position: relative; display: inline-block; white-space: nowrap; }
.de-mark::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .2em; background: var(--de-aqua); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C40 3 90 4 130 5 S180 7 198 4' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C40 3 90 4 130 5 S180 7 198 4' fill='none' stroke='black' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

/* Signature 2: three little spark strokes above an active item */
.de-spark { position: relative; }
.de-spark::before { content: ""; position: absolute; left: 50%; top: -20px; width: 44px; height: 16px; transform: translateX(-50%); background: var(--de-aqua); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 16'%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6 L12 13'/%3E%3Cpath d='M22 2 L22 11'/%3E%3Cpath d='M36 6 L32 13'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 16'%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6 L12 13'/%3E%3Cpath d='M22 2 L22 11'/%3E%3Cpath d='M36 6 L32 13'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }

/* Nav: logo left, plain spaced links right */
.de-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.de-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; text-decoration: none; }
.de-logo__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--de-radish); color: var(--de-paper); }
.de-nav__links { display: flex; gap: 36px; font-size: 16px; font-weight: 500; }
.de-nav__links a { text-decoration: none; }
.de-nav__links a:hover { color: var(--de-radish); }

/* Buttons: radius 10. Radish for the one main action, outlined charcoal for the rest */
.de-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border: 1.5px solid transparent; border-radius: var(--de-radius); font-family: var(--de-sans); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .2s var(--de-ease), color .2s var(--de-ease), transform .2s var(--de-ease); }
.de-btn:active { transform: translateY(1px); }
.de-btn--primary { background: var(--de-radish); color: var(--de-paper); }
.de-btn--primary:hover { background: var(--de-radish-dark); }
.de-btn--outline { border: var(--de-border-strong); background: var(--de-paper); color: var(--de-ink); }
.de-btn--outline:hover { background: var(--de-mist); }
.de-btn--white { background: var(--de-paper); color: var(--de-ink); }
.de-btn--ghost { border-color: rgba(255, 255, 255, .45); background: transparent; color: var(--de-paper); }
.de-btn--sm { padding: 8px 14px; font-size: 14px; }
.de-btn--block { width: 100%; }
.de-btn__two { display: grid; text-align: left; line-height: 1.1; }
.de-btn__two small { font-size: 12px; font-weight: 500; }
.de-btn__two strong { font-size: 21px; font-weight: 600; }
.de-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.de-center .de-actions { justify-content: center; }

/* Device tabs: icon + label, the active one sketched */
.de-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; margin-top: 36px; padding: 0; list-style: none; }
.de-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 2px 8px; border: 0; background: none; color: var(--de-faint); font: 400 22px var(--de-sans); cursor: pointer; }
.de-tabs button svg { width: 22px; height: 22px; }
.de-tabs button[aria-pressed="true"] { position: relative; color: var(--de-ink); }
.de-tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--de-aqua); }
.de-new { margin-left: 2px; color: var(--de-radish); font-size: 10px; font-weight: 800; letter-spacing: .06em; vertical-align: super; }

/* App window: slate sidebar, mist list, white editor */
.de-app { display: grid; grid-template-columns: 200px 270px 1fr; overflow: hidden; min-height: 440px; border: var(--de-border); border-radius: var(--de-radius-lg); background: var(--de-paper); box-shadow: var(--de-shadow-lg); text-align: left; }
.de-app__side { padding: 14px 10px; background: var(--de-slate); color: rgba(255, 255, 255, .78); font-size: 13.5px; }
.de-app__lights { display: flex; gap: 7px; margin: 2px 6px 18px; }
.de-app__lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--de-light-red); }
.de-app__lights i:nth-child(2) { background: var(--de-light-amber); }
.de-app__lights i:nth-child(3) { background: var(--de-light-green); }
.de-app__nav { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.de-app__nav li { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: var(--de-radius-sm); }
.de-app__nav li[aria-current] { background: var(--de-slate-2); color: var(--de-paper); }
.de-app__nav svg { width: 15px; height: 15px; opacity: .7; }
.de-app__list { border-right: var(--de-border); background: var(--de-paper); }
.de-app__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.de-note { padding: 12px 16px 14px; border-left: 3px solid transparent; border-top: var(--de-border); font-size: 13px; }
.de-note strong { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 600; }
.de-note p { margin: 0; color: var(--de-soft); line-height: 1.45; }
.de-note time { display: block; margin-top: 6px; color: var(--de-faint); font-size: 11.5px; }
.de-note[aria-current] { border-left-color: var(--de-radish); background: var(--de-mist); }
.de-app__editor { padding: 40px clamp(20px, 6%, 70px); font-size: 15px; line-height: 1.7; }
.de-app__editor h4 { margin: 0 0 12px; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.de-md { color: var(--de-faint); font-family: var(--de-mono); font-size: .85em; }
.de-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--de-radius-pill); background: var(--de-mist-2); color: var(--de-ink); font-size: .92em; }
.de-check { display: flex; align-items: center; gap: 10px; color: var(--de-soft); }
.de-check::before { content: ""; width: 14px; height: 14px; flex: none; border: 1.5px solid var(--de-faint); border-radius: 4px; }
.de-check--done { color: var(--de-faint); text-decoration: line-through; }
.de-check--done::before { border-color: var(--de-radish); background: var(--de-radish); }

/* Callout: amber left bar, used for tips in the editor and in articles */
.de-callout { margin: 20px 0; padding: 14px 18px; border: 1px solid var(--de-amber-line); border-left: 4px solid var(--de-amber); border-radius: var(--de-radius-sm); background: var(--de-amber-soft); }
.de-callout strong { display: block; font-weight: 600; }

/* Cards and feature grid */
.de-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.de-card { padding: 28px; border: var(--de-border); border-radius: var(--de-radius-lg); background: var(--de-paper); }
.de-card p { margin: 8px 0 0; color: var(--de-soft); }
.de-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: var(--de-radish-soft); color: var(--de-radish); }
.de-icon--aqua { background: var(--de-aqua-soft); color: var(--de-aqua-ink); }
.de-icon svg { width: 22px; height: 22px; }

/* Badges */
.de-badge { display: inline-block; padding: 3px 10px; border-radius: var(--de-radius-pill); background: var(--de-radish-soft); color: var(--de-radish-dark); font-size: 12px; font-weight: 700; }
.de-badge--mist { background: var(--de-mist-2); color: var(--de-ink); }

/* Quote */
.de-quote { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }
.de-quote cite { display: block; margin-top: 18px; color: var(--de-soft); font-size: 15px; font-style: normal; font-weight: 500; }

/* Forms */
.de-field { display: grid; gap: 7px; margin-bottom: 18px; }
.de-label { font-size: 14px; font-weight: 600; }
.de-input { width: 100%; padding: 12px 14px; border: var(--de-border); border-radius: var(--de-radius); background: var(--de-paper); color: var(--de-ink); font: 400 16px var(--de-sans); }
.de-input:focus { outline: none; border-color: var(--de-aqua); box-shadow: 0 0 0 3px var(--de-aqua-soft); }
.de-hint { color: var(--de-soft); font-size: 13px; }
.de-checkline { display: flex; gap: 10px; align-items: flex-start; color: var(--de-soft); font-size: 14px; }
.de-checkline input { margin-top: 4px; accent-color: var(--de-radish); }
.de-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--de-faint); font-size: 13px; }
.de-or::before, .de-or::after { content: ""; flex: 1; height: 1px; background: var(--de-line); }

/* Pricing */
.de-toggle { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--de-radius); background: var(--de-mist); }
.de-toggle button { padding: 7px 16px; border: 0; border-radius: var(--de-radius-sm); background: transparent; color: var(--de-soft); font: 600 14px var(--de-sans); cursor: pointer; white-space: nowrap; }
.de-toggle button[aria-pressed="true"] { background: var(--de-paper); color: var(--de-ink); box-shadow: var(--de-shadow); }
.de-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.de-plan { padding: 32px 28px; border: var(--de-border); border-radius: var(--de-radius-lg); background: var(--de-paper); }
.de-plan--pick { border: 2px solid var(--de-radish); box-shadow: var(--de-shadow); }
.de-plan__price { margin: 18px 0 4px; font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.de-plan__price small { color: var(--de-soft); font-size: 16px; font-weight: 500; letter-spacing: 0; }
.de-plan ul { display: grid; gap: 10px; margin: 24px 0 28px; padding: 0; list-style: none; font-size: 15px; }
.de-plan li { display: flex; gap: 10px; }
.de-plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: var(--de-aqua-soft); box-shadow: inset 0 0 0 4px var(--de-aqua); }
.de-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.de-table th, .de-table td { padding: 14px 12px; border-bottom: var(--de-border); text-align: left; }
.de-table th { font-weight: 600; }
.de-table td + td, .de-table th + th { text-align: center; }

/* FAQ */
.de-faq details { padding: 18px 0; border-bottom: var(--de-border); }
.de-faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.de-faq summary::after { content: "+"; float: right; color: var(--de-radish); font-weight: 700; }
.de-faq details[open] summary::after { content: "\2212"; }
.de-faq p { margin: 10px 0 0; color: var(--de-soft); }

/* Article */
.de-article { font-size: 19px; line-height: 1.75; }
.de-article h2 { margin: 48px 0 12px; font-size: 28px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
.de-article p { margin: 0 0 22px; }
.de-article ul { margin: 0 0 22px; padding-left: 22px; }
.de-article li { margin-bottom: 8px; }
.de-article blockquote { margin: 32px 0; padding-left: 22px; border-left: 3px solid var(--de-aqua); font-size: 22px; font-weight: 500; line-height: 1.5; }
.de-article code { padding: 1px 6px; border-radius: 4px; background: var(--de-mist); font-family: var(--de-mono); font-size: .82em; }
.de-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; color: var(--de-soft); font-size: 15px; }
.de-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--de-aqua-soft); color: var(--de-aqua-ink); font-weight: 700; }
.de-figure { margin: 36px 0; padding: 28px; border-radius: var(--de-radius-lg); background: var(--de-mist); }
.de-figure figcaption { margin-top: 12px; color: var(--de-soft); font-size: 14px; text-align: center; }

/* Footer */
.de-footer { padding-block: 56px 40px; border-top: var(--de-border); color: var(--de-soft); font-size: 15px; }
.de-footer__cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.de-footer h5 { margin: 0 0 12px; color: var(--de-ink); font-size: 14px; font-weight: 700; }
.de-footer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.de-footer a { text-decoration: none; }
.de-footer a:hover { color: var(--de-radish); }
.de-footer__base { margin-top: 40px; font-size: 13px; }

/* Phones and tablets */
@media (max-width: 900px) {
  .de-app { grid-template-columns: 1fr; }
  .de-app__side, .de-app__list { display: none; }
  .de-grid, .de-plans, .de-footer__cols { grid-template-columns: 1fr; }
  .de-nav__links { display: none; }
}
@media (max-width: 560px) {
  .de-tabs { gap: 8px 18px; }
  .de-tabs button { font-size: 18px; }
  .de-table th, .de-table td { padding: 12px 6px; font-size: 14px; }
}
