/* Creative Commons FAQ: a compact reference desk rather than a campaign site.
 * Strong rules and numbered modules make 120 answers navigable; the restrained
 * yellow/blue palette keeps conditions and actions visually distinct. */

:root[data-site="creativecommons"] {
  --paper: #fffef9;
  --paper-alt: #f5f3eb;
  --ink: #161616;
  --ink-soft: #4c4a43;
  --ink-faint: #69665d;
  --line: #d9d5c9;
  --accent: #1756c4;
  --accent-ink: #12459c;
  --accent-soft: #e8efff;
  --cc-yellow: #ffd447;
  --cc-yellow-soft: #fff6cb;
  --cc-black: #161616;
  --cc-blue: #1756c4;
  --cc-green: #147d64;
  --radius: 0;
  --wrap: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --drawer-bg: #fffef9;
  --drawer-field: #f5f3eb;
}

@media (prefers-color-scheme: dark) {
  :root[data-site="creativecommons"] {
    --paper: #151513;
    --paper-alt: #20201d;
    --ink: #f5f3ea;
    --ink-soft: #cfcbc0;
    --ink-faint: #aaa69b;
    --line: #3b3933;
    --accent: #78a5ff;
    --accent-ink: #9abbff;
    --accent-soft: #1b2a48;
    --cc-yellow: #e3bc3f;
    --cc-yellow-soft: #3c3420;
    --cc-black: #f5f3ea;
    --cc-blue: #78a5ff;
    --cc-green: #58c4a5;
    --drawer-bg: #20201d;
    --drawer-field: #151513;
  }
}

:root[data-site="creativecommons"] body { color: var(--ink); background: var(--paper); }
:root[data-site="creativecommons"] h1,
:root[data-site="creativecommons"] h2,
:root[data-site="creativecommons"] h3 { letter-spacing: -.035em; }

/* Header */
.cc-header { background: var(--paper); border-bottom: 1px solid var(--ink); }
.cc-header-main { min-height: 5rem; display: grid; grid-template-columns: auto 1fr minmax(14rem, 24rem); gap: 1rem; align-items: center; }
.cc-brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; width: fit-content; }
.cc-brand > span:last-child { display: grid; line-height: 1.08; }
.cc-brand strong { font-size: 1.04rem; letter-spacing: -.02em; }
.cc-brand small { margin-top: .22rem; color: var(--ink-faint); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.cc-symbol { width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-weight: 900; letter-spacing: -.1em; padding-right: .08em; }
.cc-header-search input { width: 100%; padding: .72rem 1rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper-alt); color: var(--ink); font: inherit; font-size: .9rem; }
.cc-nav { background: var(--cc-black); }
.cc-nav-inner { display: flex; overflow-x: auto; gap: 0; scrollbar-width: none; }
.cc-nav a { color: var(--paper); text-decoration: none; white-space: nowrap; font-size: .76rem; font-weight: 700; padding: .7rem .82rem; }
.cc-nav a:hover, .cc-nav a.is-current { color: #161616; background: var(--cc-yellow); }
.cc-toggle { display: none; }
.cc-drawer-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; }
.cc-drawer-brand .cc-symbol { width: 2rem; height: 2rem; flex-basis: 2rem; font-size: .72rem; }

/* Hero */
.cc-hero { background: var(--cc-yellow); color: #161616; border-bottom: 1px solid #161616; }
.cc-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(20rem, .8fr); gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 7vw, 6.5rem); align-items: end; }
.cc-eyebrow { margin: 0 0 .8rem; color: var(--accent-ink); font-size: .72rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.cc-hero .cc-eyebrow { color: #123c83; }
.cc-hero h1 { max-width: 14ch; margin: 0; font-size: clamp(2.8rem, 7.2vw, 6rem); line-height: .94; letter-spacing: -.065em; }
.cc-standfirst { margin: 1.25rem 0 0; max-width: 56ch; font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.5; }
.cc-hero-search { margin-top: 2rem; max-width: 46rem; }
.cc-hero-search > label { display: block; margin-bottom: .45rem; font-size: .82rem; font-weight: 800; }
.cc-hero-search > div { display: grid; grid-template-columns: 1fr auto; border: 2px solid #161616; background: #fffef9; }
.cc-hero-search input { min-width: 0; padding: .9rem 1rem; border: 0; color: #161616; background: transparent; font: inherit; }
.cc-hero-search button { padding: .8rem 1.1rem; border: 0; border-left: 2px solid #161616; background: #161616; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.cc-quick { border-top: 3px solid #161616; }
.cc-quick h2 { margin: 0; padding: .75rem 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.cc-quick a { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; border-top: 1px solid rgba(22,22,22,.42); padding: 1rem 0; color: #161616; text-decoration: none; }
.cc-quick a:last-child { border-bottom: 1px solid rgba(22,22,22,.42); }
.cc-quick a > span:nth-child(2) { display: grid; }
.cc-quick small { margin-top: .18rem; color: #4a4230; }
.cc-task-no { font-family: var(--serif); font-size: 1.3rem; }

/* Shared section framing */
.cc-license-section, .cc-resources, .cc-popular, .cc-topics, .cc-latest { padding-block: clamp(3rem, 7vw, 6rem); }
.cc-resources, .cc-popular, .cc-topics, .cc-latest { border-top: 1px solid var(--ink); }
.cc-section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.6rem; }
.cc-section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; }
.cc-section-head > a { font-weight: 750; white-space: nowrap; }
.cc-section-head > p { margin: 0; color: var(--ink-faint); font-size: .9rem; }

/* License cards */
.cc-license-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.cc-license { min-height: 10.5rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); color: var(--ink); text-decoration: none; background: var(--paper); transition: background .15s ease; }
.cc-license:hover { background: var(--accent-soft); }
.cc-license > strong { margin-top: auto; font-size: 1.35rem; }
.cc-license > small { color: var(--ink-soft); }
.cc-badges { display: flex; gap: .3rem; margin-bottom: 1.4rem; }
.cc-badges b { width: 2.35rem; height: 2.35rem; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; font-size: .65rem; }
.cc-public-tools { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 5px solid var(--cc-green); background: var(--paper-alt); }
.cc-public-tools p { margin: 0; }

/* Popular questions */
.cc-popular-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cc-popular-grid a { min-height: 9.5rem; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; color: var(--ink); text-decoration: none; background: var(--paper); }
.cc-popular-grid a:hover { background: var(--cc-yellow-soft); }
.cc-popular-grid span { color: var(--accent-ink); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cc-popular-grid strong { max-width: 26ch; font-size: 1.05rem; line-height: 1.35; }

/* Primary-source links: visible evidence, not a logo strip or an SEO link dump. */
.cc-authority { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--ink); }
.cc-authority-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 29rem); gap: 2rem; align-items: end; margin-bottom: 1.25rem; }
.cc-authority-head h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.7rem); line-height: 1; }
.cc-authority-head > p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.55; }
.cc-authority-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cc-authority-grid li { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cc-authority-grid a { min-height: 10rem; height: 100%; display: flex; flex-direction: column; padding: 1rem; color: var(--ink); text-decoration: none; background: var(--paper); }
.cc-authority-grid a:hover { background: var(--accent-soft); }
.cc-authority-grid span { color: var(--accent-ink); font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.cc-authority-grid strong { margin-top: auto; font-size: 1rem; line-height: 1.25; }
.cc-authority-grid small { margin-top: .35rem; color: var(--ink-faint); font-size: .73rem; line-height: 1.35; }
.doc .cc-authority { margin-top: 2.8rem; padding-bottom: 0; }
.doc .cc-authority-head { grid-template-columns: 1fr; gap: .55rem; }
.doc .cc-authority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc .cc-authority-grid a { min-height: 8.5rem; }

/* Curated open-content directory. Each column is a distinct task and each row
   carries the licensing caveat a bare logo or source name would omit. */
.cc-resources .cc-section-head > p { max-width: 32rem; line-height: 1.55; }
.cc-resource-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.cc-resource-group { min-width: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.cc-resource-group > header { display: flex; align-items: baseline; gap: .7rem; padding: 1rem; color: #161616; background: var(--cc-yellow); border-bottom: 1px solid var(--ink); }
.cc-resource-group > header span { font-family: var(--serif); font-size: 1.1rem; }
.cc-resource-group h3 { margin: 0; font-size: 1.35rem; }
.cc-resource-group ul { margin: 0; padding: 0; list-style: none; }
.cc-resource-group li + li { border-top: 1px solid var(--line); }
.cc-resource-group a { position: relative; display: flex; flex-direction: column; min-height: 7.3rem; padding: 1rem 2.2rem 1rem 1rem; color: var(--ink); text-decoration: none; background: var(--paper); }
.cc-resource-group a::after { content: "↗"; position: absolute; top: 1rem; right: 1rem; color: var(--accent-ink); font-weight: 800; }
.cc-resource-group a:hover { background: var(--accent-soft); }
.cc-resource-group strong { line-height: 1.3; }
.cc-resource-group small { margin-top: .35rem; color: var(--ink-soft); font-size: .78rem; line-height: 1.45; }

/* Full topic map */
.cc-topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cc-topic { min-width: 0; padding: 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cc-topic-count { margin: 0 0 2rem; font-family: var(--serif); color: var(--cc-blue); font-size: 1.5rem; }
.cc-topic h3 { margin: 0 0 .8rem; font-size: 1.3rem; }
.cc-topic h3 a { color: var(--ink); text-decoration: none; }
.cc-topic ul { list-style: none; padding: 0; margin: 0; }
.cc-topic li { padding: .35rem 0; border-top: 1px dotted var(--line); font-size: .87rem; line-height: 1.35; }
.cc-topic li a { color: var(--ink-soft); text-decoration: none; }
.cc-topic-more { display: inline-block; margin-top: 1rem; font-size: .78rem; font-weight: 800; }

/* Footer */
.cc-footer { color: #f5f3ea; background: #161616; border-top: .6rem solid var(--cc-yellow); }
.cc-footer-grid { display: grid; grid-template-columns: 1.5fr 2fr .7fr; gap: 3rem; padding-block: 3rem; }
.cc-footer .cc-brand { color: #f5f3ea; }
.cc-footer .cc-brand small, .cc-footer-about > p { color: #aaa69b; }
.cc-footer-about > p { max-width: 36ch; font-size: .86rem; }
.cc-footer .cc-legal-note { padding-top: .8rem; border-top: 1px solid #3b3933; }
.cc-footer-head { margin: 0 0 .7rem; color: var(--cc-yellow); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.cc-footer nav a { display: block; padding: .18rem 0; color: #cfcbc0; font-size: .84rem; text-decoration: none; }
.cc-footer-topics { columns: 2; column-gap: 1.5rem; }
.cc-footer-topics .cc-footer-head { column-span: all; }
.cc-independence { display: grid; grid-template-columns: minmax(12rem, .6fr) minmax(0, 2fr); gap: 1.5rem; padding: 1rem 1.1rem; border: 1px solid #4a473f; color: #cfcbc0; font-size: .78rem; line-height: 1.5; }
.cc-independence strong { color: #fff6cb; }
.cc-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem 1.4rem; border-top: 1px solid #3b3933; color: #aaa69b; font-size: .76rem; }
.cc-footer-bottom p { margin: 0; }

/* Article pages use the common renderer; tune its measure and answer rhythm. */
:root[data-site="creativecommons"] .prose { max-width: 44rem; font-size: 1.04rem; }
:root[data-site="creativecommons"] .prose p { line-height: 1.72; }
:root[data-site="creativecommons"] .prose h2 { margin-top: 2.6rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
:root[data-site="creativecommons"] .prose h3 { margin-top: 2rem; }
:root[data-site="creativecommons"] .prose table { font-size: .9rem; }
:root[data-site="creativecommons"] .breadcrumbs { font-size: .78rem; }

@media (max-width: 900px) {
  .cc-header-main { grid-template-columns: auto 1fr auto; }
  .cc-toggle { display: inline-grid; }
  .cc-header-search { display: none; }
  .cc-hero-grid { grid-template-columns: 1fr; }
  .cc-quick { max-width: 44rem; }
  .cc-license-grid, .cc-popular-grid, .cc-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-authority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-resource-columns { grid-template-columns: 1fr; }
  .cc-footer-grid { grid-template-columns: 1fr 1.4fr; }
  .cc-footer-grid > nav:last-child { grid-column: 1; }
}

@media (max-width: 580px) {
  .cc-header-main { min-height: 4.3rem; }
  .cc-brand small { display: none; }
  .cc-symbol { width: 2.35rem; height: 2.35rem; flex-basis: 2.35rem; font-size: .78rem; }
  .cc-hero-grid { padding-block: 3rem; }
  .cc-hero h1 { font-size: clamp(2.65rem, 15vw, 4.2rem); }
  .cc-hero-search > div { grid-template-columns: 1fr; }
  .cc-hero-search button { border-left: 0; border-top: 2px solid #161616; }
  .cc-section-head { align-items: start; flex-direction: column; gap: .65rem; }
  .cc-license-grid, .cc-popular-grid, .cc-topic-grid { grid-template-columns: 1fr; }
  .cc-authority-head { grid-template-columns: 1fr; gap: .65rem; }
  .cc-authority-grid, .doc .cc-authority-grid { grid-template-columns: 1fr; }
  .cc-authority-grid a, .doc .cc-authority-grid a { min-height: 7.5rem; }
  .cc-license { min-height: 9rem; }
  .cc-footer-grid { grid-template-columns: 1fr; }
  .cc-footer-grid > nav:last-child { grid-column: auto; }
  .cc-independence { grid-template-columns: 1fr; gap: .25rem; }
  .cc-footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-license { transition: none; }
}
