/* Little Pencil Co. — plain CSS, mobile-first, white theme */
:root {
  --yellow: #F6C445;
  --yellow-soft: #FDEFC4;
  --coral: #F28C6B;
  --coral-soft: #FCE3D9;
  --coral-ink: #A8452A;      /* coral darkened for text/links: 5.6:1 on white */
  --sky: #8EC5E8;
  --sky-soft: #E3F1FA;
  --cream: #FFF9EF;
  --white: #FFFFFF;
  --ink: #2E2E3A;
  --ink-soft: #55556A;       /* 7.4:1 on white */
  --line: #E8E8EE;
  --bg: #FFFFFF;
  --surface-alt: #F7F8FA;  /* soft grey for alternating sections */
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 4px 18px rgba(46, 46, 58, 0.06);
  --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--coral-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
code { background: var(--yellow-soft); padding: .1em .35em; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 780px; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--ink-soft); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pre { white-space: pre-wrap; }

/* Notice bar + header */
.notice-bar { background: var(--yellow-soft); color: var(--ink); border-bottom: 1px solid #F3E2A6; text-align: center; font-size: .9rem; font-weight: 600; padding: 7px var(--gutter); }
.notice-bar p { margin: 0; }
.site-header { background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 12px; background: var(--white); cursor: pointer; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; } .nav-toggle-bar::after { top: 6px; }
.site-nav { display: none; width: 100%; padding-bottom: 12px; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-nav a { display: block; padding: 10px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--yellow-soft); }
html:not(.js) .site-nav { display: block; }
html:not(.js) .nav-toggle { display: none; }
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; padding: 0; }
  .site-nav ul { flex-direction: row; }
  .header-inner { flex-wrap: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 2px solid var(--ink); font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; color: var(--ink); background: var(--white); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { background: var(--yellow); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 1rem; }
.btn-row--center { justify-content: center; }
.link-arrow { font-weight: 700; }
.link-arrow::after { content: ' →'; }

/* Sections */
.section { padding: 56px 0; }
.section--flush-top { padding-top: 0; }
.section--tint { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: .4em; }
.section-title--sm { font-size: 1.5rem; }
.section-sub { color: var(--ink-soft); max-width: 640px; margin-bottom: 2rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 1.5rem; }
.section-head .section-title { margin: 0; }
.page-head { padding: 48px 0 32px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow { display: inline-block; background: var(--sky-soft); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.section--tint .card { background: var(--white); }

/* Hero */
.hero { padding: 40px 0 56px; background: radial-gradient(circle at 90% 10%, #FFF6DA, transparent 42%), radial-gradient(circle at 0% 100%, #EEF7FC, transparent 38%), var(--bg); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-note { font-weight: 700; font-size: .95rem; }
.hero-art img { border-radius: var(--radius); }
@media (min-width: 900px) { .hero { padding: 72px 0 88px; } .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.step { position: relative; padding-top: 28px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); font: 600 1.3rem var(--font-head); margin-bottom: 12px; }
.step:nth-child(2) .step-num { background: var(--sky); }
.step:nth-child(3) .step-num { background: var(--coral); }
.step p { margin: 0; color: var(--ink-soft); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Products */
.product-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--yellow-soft); }
.product-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.product-card-title { margin-bottom: .3em; }
.product-card-title a { color: var(--ink); text-decoration: none; }
.product-card-title a:hover { text-decoration: underline; }
.product-card-desc { color: var(--ink-soft); }
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meta-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.meta-chips li { background: var(--sky-soft); border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 700; }
.meta-chips li:nth-child(2) { background: var(--coral-soft); }
.meta-chips li:nth-child(3) { background: var(--yellow-soft); }
.price { font: 600 1.4rem var(--font-head); margin: 0; }
.price--large { font-size: 2.2rem; }
.price-currency { font: 700 .9rem var(--font-body); color: var(--ink-soft); }

/* Preview */
.preview-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .preview-grid { grid-template-columns: repeat(3, 1fr); } }
.preview { margin: 0; }
.preview img { border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.preview figcaption { margin-top: 10px; font-size: .95rem; color: var(--ink-soft); }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.section--tint .faq-item { background: var(--white); }
.faq-item summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; position: relative; list-style: none; border-radius: var(--radius-sm); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font: 600 1.4rem var(--font-head); color: var(--coral-ink); }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 20px 6px; color: var(--ink-soft); }

/* About + signup */
.about p { font-size: 1.1rem; }
.signup-card { background: #FFFBEB; border-color: #F3E2A6; text-align: left; }
.signup-form { display: grid; gap: 16px; margin-top: 8px; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #CDCDD6; border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px;
}
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--ink); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #B3261E; }
.field-error { color: #B3261E; font-weight: 700; font-size: .95rem; margin: 0; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.field--check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--ink); }
.field--check label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.form-status:empty { display: none; }
.form-status { border-radius: var(--radius-sm); padding: 12px 16px; background: var(--sky-soft); font-weight: 600; }
.form-status.is-error { background: #FBE4E2; color: #8C1D18; }
.form-status.is-ok { background: #E3F4E6; color: #1E5B2A; }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.alert p { margin: 0; }
.alert--ok { background: #E3F4E6; color: #1E5B2A; }
.alert--error { background: #FBE4E2; color: #8C1D18; }
.contact-form { display: grid; gap: 16px; }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.5fr 1fr; } }
.business { font-style: normal; margin-bottom: 1.5rem; }
.login-card { max-width: 420px; margin: 0 auto; }
.login-card form { display: grid; gap: 16px; }

/* Product page */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 20px 0; margin: 0; font-size: .95rem; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--ink-soft); }
.product-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .product-layout { grid-template-columns: 1fr 1fr; gap: 56px; } }
.gallery-main img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; aspect-ratio: 4 / 5; object-fit: contain; }
.gallery-thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-thumb { padding: 0; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; overflow: hidden; width: 100%; }
.gallery-thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-thumb[aria-pressed="true"] { border-color: var(--ink); }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 24px; }
.spec-list div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.spec-list dt { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.spec-list dd { margin: 0; font-weight: 700; }
.buy-box { display: grid; gap: 12px; }
.buy-box .price { margin: 0; }
.buy-notice { font-weight: 700; background: var(--sky-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0; }
.buy-form { display: grid; gap: 14px; }
.setup-note { margin: 0; font-size: .9rem; color: #8C1D18; }
.product-details { display: grid; gap: 32px; }
@media (min-width: 900px) { .product-details { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 34px; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.refund-note { margin-top: 24px; background: var(--coral-soft); border-color: #F5C9B8; box-shadow: none; }
.refund-note p { margin: 0; }

/* Reviews */
.reviews-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
.review { margin: 0; }
.review blockquote { margin: 0 0 12px; font-size: 1.05rem; }
.review figcaption { font-weight: 700; }
.review-date { font-weight: 400; color: var(--ink-soft); }

/* Message pages */
.message-card { text-align: center; padding: 40px 28px; }
.message-card .pencil-icon { margin: 0 auto 16px; }

/* Legal */
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal-updated { color: var(--ink-soft); }
.legal ul { padding-left: 1.3rem; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); margin: 16px 0 32px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--yellow-soft); }
.legal .table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Admin */
.stat-grid { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-label { font-weight: 700; color: var(--ink-soft); margin: 0; }
.stat-value { font: 600 2rem var(--font-head); margin: 0; }
.tag { display: inline-block; border-radius: 999px; padding: 0 10px; font-size: .8rem; font-weight: 700; background: var(--sky-soft); }
.tag--refunded, .tag--partial_refund { background: var(--coral-soft); }
.tag--paid { background: #E3F4E6; }
.admin-messages-title { margin-top: 2rem; }
.admin-message { margin-bottom: 12px; padding: 16px 20px; }

/* Footer */
.site-footer { background: var(--surface-alt); color: var(--ink); border-top: 1px solid var(--line); padding: 48px 0 24px; margin-top: 0; }
.site-footer a { color: var(--coral-ink); }
.site-footer .brand { color: var(--ink); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; } }
.footer-heading { font-size: 1.05rem; color: var(--ink); margin-bottom: .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-tagline { margin-top: 10px; }
.footer-notice { color: var(--ink); }
.footer-small { font-size: .9rem; color: var(--ink-soft); }
.footer-bottom { border-top: 1px solid var(--line); color: var(--ink-soft); margin-top: 32px; padding-top: 16px; font-size: .9rem; }
.footer-bottom p { margin: 0; }
