/* STUDY — shared stylesheet for /study.html and every page under /study/art-history/.
   Colors and fonts come from /site-tokens.css (the main site's look, light only);
   the top bar from /site-bar.css; the menu from /site-chrome.css.
   The only course-specific touch is the Greek-key divider (.rule). */

:root {
  --key: #a4482a;           /* Greek-key divider, the one accent kept from the original guide */
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.5;
  min-height: 100vh; display: flex; flex-direction: column; padding-top: var(--nav-h); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent-ink); }

/* ---------- FOOTER (site chrome) ---------- */
footer { border-top: 1px solid var(--border); margin-top: 56px; padding: 64px 20px 48px; font-weight: 300; }
@media (min-width: 701px) { footer { padding-left: 40px; padding-right: 40px; } }
@media (min-width: 1100px) { footer { padding-left: 60px; padding-right: 60px; } }
.f-inner { max-width: 1200px; margin: 0 auto; }
.f-cols { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px; }
.f-brand { font-size: clamp(26px, 3vw, 36px); font-weight: 700; text-transform: lowercase; letter-spacing: -0.01em; }
.f-links { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.f-links a, .f-links button { font-size: 15px; font-weight: 400; text-transform: lowercase; color: var(--ink2); background: none; border: none; padding: 0; font-family: var(--font); cursor: pointer; transition: color 0.2s; text-decoration: none; display: inline-block; }
.f-links a:hover, .f-links button:hover { color: var(--ink); }
.f-legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink3); letter-spacing: 0.06em; }
.f-logo { height: 40px; width: auto; display: block; margin-top: 14px; }
@media (max-width: 600px) { footer { padding: 48px 20px 40px; } }

/* ---------- PAGE FRAME ---------- */
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px 20px 0; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 701px) { main { padding: 24px 40px 0; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink3); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--border-mid); }
.crumbs a { color: var(--ink3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; isolation: isolate; }
.btn { font: 500 14px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--border-mid); border-radius: 22px; padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible, .pic img:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pos { font-variant-numeric: tabular-nums; color: var(--ink3); font-size: 14px; }

/* ---------- STUDY TYPE ---------- */
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink3); font-weight: 500; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.artist { font-size: 17px; color: var(--ink2); font-weight: 500; }
.title { font-style: italic; font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; color: var(--ink); letter-spacing: -0.005em; text-wrap: balance; }
.title.plain { font-style: normal; }
.date { font-size: 16px; color: var(--ink2); }
.det { color: var(--ink2); font-size: 15px; }
.fn { font-size: 15px; padding: 10px 14px; background: var(--surface); border-radius: 6px; }
.fn b { font-weight: 500; color: var(--ink); }
.htitle { font-weight: 500; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; color: var(--ink); letter-spacing: -0.01em; text-wrap: balance; }
.hsub { font-style: italic; color: var(--ink2); font-size: 18px; }
.sum { font-size: 16.5px; line-height: 1.75; max-width: 68ch; }
.stmt { font-size: 18px; line-height: 1.5; font-weight: 500; }
.rule { border: 0; height: 8px; margin: 4px 0; background: var(--key); opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 7.5h6V1.5H2v3h2' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M8 7.5h6V1.5h-4v3h2' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") repeat-x left center / 16px 8px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 7.5h6V1.5H2v3h2' fill='none' stroke='black' stroke-width='1'/%3E%3Cpath d='M8 7.5h6V1.5h-4v3h2' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E") repeat-x left center / 16px 8px; }
ul.b { padding-left: 1.15em; display: grid; gap: 6px; }
.terms { display: grid; gap: 8px; }
.terms dt { display: inline; font-weight: 500; color: var(--accent-ink); }
.terms dt::after { content: " — "; font-weight: 400; color: var(--ink3); }
.terms dd { display: inline; }
blockquote { padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 6px 6px 0; font-style: italic; font-size: 16.5px; }
blockquote cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: var(--ink3); }
.wl { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.wlink { border: 1px solid var(--border-mid); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font: 400 14px var(--font); text-decoration: none; display: inline-block; }
.wlink:hover { border-color: var(--accent); }
.lab { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink3); }
.crl { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--ink3); }
.crl a { color: var(--ink3); }

/* ---------- SLIDE-STYLE CARD: image panel beside notes ---------- */
.slide { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); min-height: 540px; }
.pic { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 20px; min-height: 300px; min-width: 0; }
.pic img { width: auto; height: auto; max-width: 100%; max-height: 78vh; object-fit: contain; display: block; cursor: zoom-in; }
.notes { padding: 26px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.slide.text { grid-template-columns: 1fr; min-height: 0; }
.slide.text .notes { max-width: 900px; }
@media (max-width: 900px) {
  .slide { grid-template-columns: 1fr; min-height: 0; }
  .pic { min-height: 220px; }
  .pic img { max-height: 55vh; }
  .notes { padding: 20px 18px; }
}

/* ---------- WORK ROWS on part pages ---------- */
.row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; text-decoration: none; color: inherit; transition: border-color .15s; }
.row:hover { border-color: var(--accent); }
.row .th { width: 132px; height: 104px; background: var(--surface); border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.row .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row .rt { display: block; font-style: italic; font-weight: 500; font-size: 18px; color: var(--ink); line-height: 1.25; }
.row .ra { display: block; color: var(--ink2); font-size: 14.5px; margin-top: 2px; }
.row .rs { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink2); font-size: 14.5px; margin-top: 6px; }
@media (max-width: 600px) {
  .row { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .row .th { width: 92px; height: 80px; }
  .row .rs { display: none; }
}
.seq { display: grid; gap: 16px; }
.seq-h { font-weight: 500; color: var(--ink); font-size: 22px; margin-top: 8px; }

/* ---------- HOME / LANDING ---------- */
.hero { padding: 28px; display: grid; gap: 14px; }
.card.hero { overflow: visible; isolation: auto; position: relative; z-index: 2; }
@media (max-width: 600px) { .hero { padding: 20px 18px; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid.parts { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tile { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .15s; }
.tile:hover { border-color: var(--accent); }
.tile .th { aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.grid.parts .tile .th { aspect-ratio: 16 / 9; }
.tile .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .tb { padding: 14px 16px 16px; display: grid; gap: 4px; }
.tile .tt { font-weight: 500; font-size: 18px; color: var(--ink); line-height: 1.25; }
.tile .ts { color: var(--ink2); font-size: 14.5px; line-height: 1.55; }
.tile .tk { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink3); }
.sec-h { font-weight: 500; font-size: 22px; color: var(--ink); margin: 14px 0 2px; scroll-margin-top: calc(var(--nav-h) + 12px); }
.th.icon { display: flex; align-items: center; justify-content: center; }
.th.icon img { width: 58%; height: auto; object-fit: contain; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); height: 100%; }
.swatches span { display: block; }

/* /study.html: the site's page header and lowercase section labels */
.lead { margin: 30px 0 4px; }
.show-title { font-size: clamp(26px, 5vw, 40px); font-weight: 700; letter-spacing: -0.01em; text-transform: lowercase; line-height: 1.15; }
.lead p { font-size: 16px; font-weight: 300; line-height: 1.85; color: var(--ink2); margin-top: 12px; max-width: 60ch; }
.grp-h { font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: lowercase; color: var(--ink3); margin: 26px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.landing .tile .tt { text-transform: lowercase; }
.landing .tile .ts { font-weight: 300; }
@media (max-width: 600px) {
  .landing .tile { flex-direction: row; }
  .landing .tile .th { width: 112px; flex: none; aspect-ratio: 1 / 1; }
  .landing .tile .tb { align-content: center; }
}

/* ---------- SEARCH (course home) ---------- */
.search { position: relative; }
.search .sico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink3); pointer-events: none; }
.search input { width: 100%; font: 400 16px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--border-mid); border-radius: 22px; padding: 11px 14px 11px 40px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-height: min(62vh, 560px); overflow: auto; padding: 6px; }
.results[hidden] { display: none; }
.rcount { margin: 4px 8px 6px; font-size: 12px; color: var(--ink3); text-transform: uppercase; letter-spacing: .1em; }
.res { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.res:hover, .res[aria-selected="true"] { background: var(--surface); }
.res img { width: 52px; height: 52px; border-radius: 4px; background: var(--surface); object-fit: cover; display: block; }
.res .rk { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink3); }
.res .rt { display: block; font-weight: 500; color: var(--ink); line-height: 1.25; }
.res .rs { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--ink2); line-height: 1.4; }
.res mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.rnone { margin: 10px; color: var(--ink2); }

/* ---------- CREDITS ---------- */
.cred { display: grid; gap: 10px; font-size: 14px; }
.cred div { border-top: 1px solid var(--border); padding-top: 8px; overflow-wrap: anywhere; }
.cred b { font-weight: 500; }

/* ---------- LIGHTBOX (full-screen image) ---------- */
.lb { position: fixed; inset: 0; z-index: 120; background: rgba(8,9,12,.93); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; cursor: zoom-out;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: calc(100% - 70px); object-fit: contain; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lb .cap { color: #e8e9ec; font-size: 15px; text-align: center; max-width: 90ch; }
.lb .x { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 22px; padding: 7px 14px; font: 500 14px var(--font); cursor: pointer; }

@media (prefers-reduced-motion: no-preference) { .card { animation: fade .18s ease-out; } @keyframes fade { from { opacity: .4; } to { opacity: 1; } } }
@media print { nav, footer, .bar, .search, #menu-panel, #menu-scrim { display: none !important; } body { padding-top: 0; } .card { border: 0; } }

/* ---------- PAGER: bottom right on every screen size (swipe also works on touch screens) ---------- */
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pager .pos { margin-right: 4px; }
.open-guide { display: flex; justify-content: flex-end; }

/* study.html art-history timeline: one left-aligned column, a rail with a dot and date per course, large image cards */
.tl { position: relative; margin-top: 18px; padding-left: 28px; display: grid; gap: 28px; max-width: 880px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; display: grid; gap: 6px; text-decoration: none; color: inherit; }
.tl-item::before { content: ""; position: absolute; left: -28px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.tl-date { font-size: 13px; letter-spacing: .12em; color: var(--ink3); }
.tl-card { display: flex; flex-direction: column; transition: border-color .15s; }
.tl-item:hover .tl-card { border-color: var(--accent); }
.tl-th { width: 100%; aspect-ratio: 16 / 7; background: var(--surface); overflow: hidden; }
.tl-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-tb { padding: 12px 16px 14px; display: grid; gap: 4px; }
.tl .tt { font-weight: 500; font-size: 20px; color: var(--ink); line-height: 1.25; text-transform: lowercase; }
.tl .ts { color: var(--ink2); font-size: 14.5px; line-height: 1.55; font-weight: 300; }
@media (max-width: 600px) { .tl-th { aspect-ratio: 4 / 3; } }

/* study.html tabs (technique / art history) */
.stabs { display: flex; gap: 28px; margin-top: 26px; border-bottom: 1px solid var(--border); }
.stabs button { font: 500 15px var(--font); letter-spacing: .08em; text-transform: lowercase; color: var(--ink3); background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 0 10px; margin-bottom: -1px; cursor: pointer; }
.stabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.stab-panel + .stab-panel { margin-top: 40px; }   /* only matters without JS, when both panels show */
.tl-plain { padding-left: 0; }
.tl-plain::before, .tl-plain .tl-item::before { display: none; }
/* technique tab: diagrams and the wheel icon are shown whole on white, not cropped */
.tl-plain .tl-th { background: var(--panel); }
.tl-plain .tl-th img { object-fit: contain; }
