/* Kaizen Harmony — styles. Colors from the logo: red #BD201A. All text colors meet WCAG AA contrast. */
@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url("../fonts/oswald-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url("../fonts/oswald-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  --red: #BD201A;
  --red-dark: #8F160F;
  --ink: #15202B;
  --ink-2: #2A3540;
  --muted: #4A5560;
  --line: #D9DCDB;
  --paper: #FFFFFF;
  --sand: #F4F4F2;
  --focus: #1F5FBF;
  --ok-bg: #E3EEE6; --ok-fg: #24452F;
  --warn-bg: #FFF4DE; --warn-line: #A86500;
  --err-bg: #FBE4DF; --err-fg: #7A140D;
  --info-bg: #E6EEF8; --info-line: #2E5A9A;
  --radius: 8px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; }
h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3, .h3 { font-family: var(--body); font-size: 1.2rem; font-weight: 700; text-transform: none; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 40px; padding-bottom: 72px; }
.section-top { margin-top: 48px; }
.narrow { max-width: 720px; }
.narrow-wide { max-width: 940px; }
.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: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 8px; color: #fff; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; color: var(--muted); }
.lead { font-size: 1.25rem; color: var(--ink-2); max-width: 620px; }
.empty { color: var(--muted); padding: 24px 0; }
.eyebrow { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--red); margin-bottom: 12px; }
.eyebrow-light { color: #F6B3A9; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: .04em; color: var(--red); }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-weight: 600; }
.nav-links a { text-decoration: none; display: inline-block; padding: 8px 0; }
.nav-links a.btn { padding: 0 18px; }
.lang-switch { border: 1.5px solid var(--ink); border-radius: 6px; padding: 4px 10px !important; font-size: .9375rem; }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 8px 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: none; }
.link-button:hover { color: var(--red-dark); text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 6px; border: 1.5px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--sand); color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9375rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.125rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button-row.end { justify-content: flex-end; }

/* Hero */
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
.hero-text { flex: 1 1 520px; }
.hero-art { flex: 1 1 360px; display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 520px; }
.display { font-size: clamp(2.75rem, 7vw, 4.75rem); line-height: 1.02; margin-bottom: 24px; }
.display-2 { font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 820px; color: #fff; }
.search { display: flex; flex-wrap: wrap; gap: 8px; max-width: 580px; margin-top: 24px; }
.search input { flex: 1 1 240px; min-height: 52px; }

/* Forms */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #6B7680; border-radius: 6px; background: #fff; color: var(--ink); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }
.input-short { max-width: 200px; }
label, legend { font-weight: 700; display: block; margin-bottom: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stack > * + * { margin-top: 18px; }
.hint { font-size: .9375rem; color: var(--muted); margin: 6px 0 0; }
.field-error { color: var(--err-fg); font-weight: 600; margin: 6px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; flex: none; accent-color: var(--red); }
.check label { font-weight: 400; margin: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 20px; }
.error-summary { border: 2px solid var(--err-fg); background: var(--err-bg); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.error-summary h2 { font-family: var(--body); font-size: 1.125rem; text-transform: none; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--err-fg); font-weight: 600; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; margin-bottom: 24px; }

/* Panels + notices */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.flashes { padding-top: 20px; }
.flash { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; font-weight: 600; }
.flash-success { background: var(--ok-bg); color: var(--ok-fg); }
.flash-info { background: var(--info-bg); color: var(--ink); }
.flash-error { background: var(--err-bg); color: var(--err-fg); }
.notice { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; border: 1.5px solid; }
.notice p { margin: 4px 0 0; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.notice-error { background: var(--err-bg); border-color: var(--err-fg); }
.notice-info { background: var(--info-bg); border-color: var(--info-line); }
.notice form { margin: 0; }
.example-box { background: var(--sand); border-radius: 6px; padding: 14px 16px; font-variant-numeric: tabular-nums; }

/* Book grid */
.band { background: var(--sand); padding: 64px 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px; }
.book-grid-sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.book-card { display: flex; flex-direction: column; gap: 4px; }
.book-card-link { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.book-card-title { font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.book-card-link:hover .book-card-title { text-decoration: underline; color: var(--red-dark); }
.book-card-author { color: var(--muted); font-size: .9375rem; }
.book-card-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.cover { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 10px rgba(21,32,43,.14); background: var(--line); }
.cover-placeholder { display: flex; align-items: flex-end; padding: 14px; background: var(--ink); color: #fff; font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; line-height: 1.15; }
.cover-lg { max-width: 340px; }
.cover-preview { margin-top: 10px; border-radius: 4px; width: 120px; height: 180px; object-fit: cover; }
.badge-a11y { display: inline-flex; gap: 6px; align-items: center; color: var(--ok-fg); font-weight: 600; font-size: .875rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 6px; font-weight: 600; text-decoration: none; }
.chip:hover { background: var(--sand); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pagination a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; }
.pagination a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.result-count { color: var(--muted); }

/* Authors band */
.authors-band { background: var(--ink); color: #fff; padding: 80px 0; }
.authors-band a:not(.btn) { color: #fff; }
.steps { list-style: none; margin: 32px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.step { border: 1px solid #3A4754; border-radius: var(--radius); padding: 24px; }
.step h3 { color: #fff; margin: 8px 0; }
.step p { color: #D3DADF; margin: 0; }
.step-num { color: #F6B3A9; font-weight: 700; letter-spacing: .08em; }
.plain-steps { padding-left: 22px; margin-bottom: 24px; }
.plain-steps li { margin-bottom: 8px; }

/* Book page */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; font-size: .9375rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.book-layout { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.book-cover-col { flex: 0 1 340px; }
.book-main { flex: 999 1 460px; min-width: 0; }
.book-title { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 8px; }
.book-subtitle { font-size: 1.25rem; color: var(--ink-2); }
.book-author { font-size: 1.125rem; color: var(--muted); }
.prose { max-width: 720px; }
.prose ul { padding-left: 22px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 24px 0; max-width: 720px; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.buy-box { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 24px; max-width: 480px; display: flex; flex-direction: column; gap: 12px; }
.buy-box p { margin: 0; }
.price { font-size: 2.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-note { color: var(--muted); }
.buy-owned { font-weight: 700; color: var(--ok-fg); }
.a11y-panel { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.a11y-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.a11y-card { background: var(--sand); border-radius: var(--radius); padding: 20px; }
.a11y-card h3 { margin-top: 0; }
.a11y-card ul { margin: 0; padding-left: 20px; }
.a11y-card p { margin: 0 0 .4em; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; border-top: 1px solid var(--line); padding-top: 40px; }
.seller-address { font-style: normal; margin-bottom: 12px; }
.report { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.report summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; }
.report[open] { padding-bottom: 20px; }
.report form > * + * { margin-top: 16px; }

/* Checkout */
.checkout-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.checkout-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.checkout-form > * { margin: 0; }
.order-summary { flex: 1 1 300px; }
.payment-element { min-height: 120px; }
.legal-checks { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 20px; }
.total-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; background: var(--sand); border-radius: 6px; padding: 14px 18px; font-weight: 700; font-size: 1.125rem; }
.total-amount { font-variant-numeric: tabular-nums; }
.summary-book { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.summary-book img { border-radius: 4px; width: 64px; height: 96px; object-fit: cover; }
.summary-lines { margin: 0 0 16px; }
.summary-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px !important; font-weight: 700; }

/* Library */
.library-list { list-style: none; margin: 0 0 24px; padding: 0; }
.library-item { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.library-item img { border-radius: 4px; width: 72px; height: 108px; object-fit: cover; }
.library-meta { flex: 1 1 240px; display: flex; flex-direction: column; }
.library-title { font-weight: 700; font-size: 1.125rem; }

/* Studio + admin */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.stat { background: var(--sand); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { color: var(--muted); font-size: .9375rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-list { list-style: none; margin: 0; padding: 0; }
.row-item { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-item img, .thumb-ph { width: 48px; height: 72px; border-radius: 4px; object-fit: cover; background: var(--line); flex: none; }
.row-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: .875rem; font-weight: 700; background: #E6E9EB; color: var(--ink-2); }
.status-live, .status-verified, .status-t-transferred { background: var(--ok-bg); color: var(--ok-fg); }
.status-review, .status-pending, .status-t-pending { background: var(--warn-bg); color: #6B4000; }
.status-rejected, .status-t-refunded, .status-t-reversed, .status-t-cancelled { background: var(--err-bg); color: var(--err-fg); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 640px; }
caption { text-align: left; color: var(--muted); padding-bottom: 8px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; color: var(--ink-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td form { margin: 0; }
.tab-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tab-links a { padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; }
.tab-links a[aria-current] { background: var(--ink); color: #fff; }
.detail-list > div { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.submit-panel { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 24px; }
.submit-panel p { margin: 0; flex: 1 1 320px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-top: 40px; padding-bottom: 48px; color: var(--muted); font-size: .9375rem; }
.footer-brand { max-width: 380px; }
.footer-brand img { margin-bottom: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 40px; }
.footer-links a { display: inline-block; padding: 4px 0; }

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding-top: 24px; padding-bottom: 48px; }
  .panel { padding: 18px; }
  .hero-grid { padding-top: 32px; padding-bottom: 32px; }
  .hero-art { display: none; }
  .brand-word { font-size: 1.25rem; }
  .footer-links { grid-template-columns: 1fr; }
  .detail-list > div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-header, .site-footer, .skip-link { display: none; } }

/* Fixes */
.nav-links a.btn { display: inline-flex; padding: 0 18px; min-height: 44px; }
.summary-lines dd { white-space: nowrap; }
