/*
Theme Name: Curl Centric Wiki
Theme URI: https://curlcentric.wiki/
Author: Curl Centric
Description: A lightweight encyclopedia skin for curlcentric.wiki. Renders a single long-form reference entry with an infobox, an auto-generated table of contents, numbered citations and a category footer. No plugins, no external requests, no JavaScript frameworks.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: curlcentric-wiki
*/

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #f6f6f6;
  color: #202122;
  font-family: sans-serif;
  font-size: 0.875rem;   /* 14px, Vector's base */
  line-height: 1.6;
}

a            { color: #3366cc; text-decoration: none; }
a:visited    { color: #795cb2; }
a:hover,
a:focus      { text-decoration: underline; }
a.external   { color: #3366cc; }
a.external::after {
  content: "";
  display: inline-block;
  width: 0.857em; height: 0.857em;
  margin-left: 0.25em;
  vertical-align: -0.1em;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233366cc' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16zM2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid #a7d7f9;
  padding: 0.6em 1em 0;
}
.header-inner {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 1em;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.site-brand:hover { text-decoration: none; }
.logo-globe { width: 46px; height: 46px; flex: 0 0 46px; }
.brand-text {
  font-family: "Linux Libertine", Georgia, Times, serif;
  font-size: 1.3rem;
  line-height: 1.15;
  color: #202122;
}
.brand-text .brand-sub {
  display: block;
  font-family: sans-serif;
  font-size: 0.62rem;
  color: #54595d;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.brand-search { margin-left: auto; padding-top: 0.5em; flex: 0 1 auto; }
.brand-search input {
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 5px 8px;
  width: 15em;
  max-width: 48vw;
  border: 1px solid #a2a9b1;
  border-radius: 2px;
  background: #fff;
  color: #202122;
}
.brand-search input:focus { outline: 1px solid #3366cc; border-color: #3366cc; }

/* ============================================================
   TABS (Article / Talk / Read / Edit / View history)
   ============================================================ */
.tabs {
  max-width: 1260px;
  margin: 0.7em auto 0;
  padding: 0 1em;
  display: flex;
  gap: 1.2em;
  font-size: 0.8125rem;
  border-bottom: 1px solid #a7d7f9;
}
.tabs .tab-group { display: flex; gap: 1.2em; }
.tabs .tab-group.right { margin-left: auto; }
.tabs span, .tabs a {
  display: block;
  padding: 0.45em 0.2em;
  color: #3366cc;
  border-bottom: 1px solid transparent;
}
.tabs .selected {
  color: #202122;
  font-weight: 400;
  border-bottom: 1px solid #fff;
  margin-bottom: -1px;
  background: #fff;
}
.tabs .dim { color: #72777d; cursor: default; }

/* ============================================================
   SHELL / CONTENT
   ============================================================ */
.shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1em 2em;
}
.content {
  background: #fff;
  border: 1px solid #a7d7f9;
  border-top: 0;
  padding: 1.25em 1.6em 1.6em;
}

.firstHeading {
  font-family: "Linux Libertine", Georgia, Times, serif;
  font-size: 1.85rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 0.15em;
  padding: 0;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 0.25em;
}
.siteSub {
  font-size: 0.8125rem;
  color: #54595d;
  margin: 0.4em 0 1em;
  font-style: italic;
}

/* Hatnotes / disclosure */
.hatnote {
  font-style: italic;
  padding-left: 1.6em;
  margin: 0.5em 0 1em;
  color: #202122;
}

/* ============================================================
   HEADINGS
   ============================================================ */
.content h2 {
  font-family: "Linux Libertine", Georgia, Times, serif;
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 1.4em 0 0.5em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid #a2a9b1;
}
.content h3 { font-size: 1.06rem; font-weight: bold; margin: 1.2em 0 0.4em; }
.content h4 { font-size: 1rem;    font-weight: bold; margin: 1.1em 0 0.35em; }
.content h2:first-child, .content h3:first-child { margin-top: 0.4em; }

.content p  { margin: 0.6em 0 0.85em; }
.content ul, .content ol { margin: 0.4em 0 0.9em; padding-left: 1.9em; }
.content li { margin-bottom: 0.22em; }
.content blockquote {
  margin: 0.9em 0 0.9em 1.4em;
  padding-left: 0.9em;
  border-left: 3px solid #c8ccd1;
  color: #202122;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc {
  display: table;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  padding: 0.6em 1.2em 0.7em 0.7em;
  margin: 1em 0;
  font-size: 0.9375em;
  border-radius: 2px;
}
.toctitle { text-align: center; margin-bottom: 0.3em; }
.toctitle h2 {
  display: inline;
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: bold;
  border: 0;
  margin: 0;
  padding: 0;
}
.toc ul { list-style: none; margin: 0; padding: 0 0 0 0.3em; }
.toc ul ul { margin-left: 1.5em; }
.toc li { margin: 0.15em 0; }
.toc .tocnumber { color: #202122; margin-right: 0.45em; }
.toc a:hover .tocnumber { text-decoration: none; }
.toctoggle { font-size: 0.85em; }

/* ============================================================
   INFOBOX
   ============================================================ */
.infobox {
  float: right;
  clear: right;
  width: 23em;
  max-width: 100%;
  margin: 0 0 1em 1.4em;
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  font-size: 0.8125rem;
  line-height: 1.5;
  border-spacing: 3px;
  border-collapse: collapse;
}
.infobox th, .infobox td {
  padding: 0.32em 0.55em;
  vertical-align: top;
  text-align: left;
  border-top: 1px solid #eaecf0;
}
.infobox tr:first-child th, .infobox tr:first-child td { border-top: 0; }
.infobox th { font-weight: bold; width: 38%; }
.ib-title {
  text-align: center !important;
  font-size: 1.12rem;
  font-weight: bold;
  background: #eaecf0;
  padding: 0.5em !important;
  border-bottom: 1px solid #a2a9b1;
}
.ib-section {
  text-align: center !important;
  background: #eaecf0;
  font-weight: bold;
  padding: 0.3em !important;
}
.ib-imgwrap { text-align: center !important; padding: 0.7em 0.5em !important; }
.ib-cap { font-size: 0.94em; color: #54595d; padding-top: 0.4em; display: block; }

/* ============================================================
   GENERAL TABLES (wikitable)
   ============================================================ */
.wikitable {
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.9375em;
  width: 100%;
}
.wikitable > * > tr > th,
.wikitable > * > tr > td { border: 1px solid #a2a9b1; padding: 0.35em 0.65em; text-align: left; vertical-align: top; }
.wikitable > * > tr > th { background: #eaecf0; font-weight: bold; }
.wikitable tbody tr:nth-child(even) td { background: #fcfcfc; }
.table-scroll { overflow-x: auto; margin: 1em 0; }
.table-scroll .wikitable { margin: 0; min-width: 34em; }

/* ============================================================
   CITATIONS / REFERENCES
   ============================================================ */
sup.reference { font-size: 0.8em; line-height: 1; unicode-bidi: isolate; white-space: nowrap; }
sup.reference a { color: #3366cc; }
.references {
  font-size: 0.9em;
  margin: 0.6em 0 1em;
  padding-left: 2.2em;
  line-height: 1.55;
  list-style-type: decimal;
}
.references li { margin-bottom: 0.35em; }
.references li:target,
sup.reference:target { background: #def; }
.mw-cite-backlink { font-style: italic; }

/* ============================================================
   CATEGORY FOOTER
   ============================================================ */
.catlinks {
  border: 1px solid #a2a9b1;
  background: #f8f9fa;
  padding: 0.4em 0.6em;
  margin: 1.6em 0 0;
  font-size: 0.8125rem;
  clear: both;
  border-radius: 2px;
}
.catlinks ul { display: inline; list-style: none; margin: 0; padding: 0; }
.catlinks li { display: inline-block; border-left: 1px solid #a2a9b1; margin: 0.12em 0; padding: 0 0.5em; }
.catlinks li:first-child { border-left: 0; padding-left: 0.35em; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  max-width: 1260px;
  margin: 0 auto;
  padding: 1.2em 1em 2.5em;
  font-size: 0.75rem;
  color: #54595d;
  line-height: 1.7;
}
.footer ul { list-style: none; margin: 0.5em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4em 1.2em; }
.footer a { color: #3366cc; }

/* ============================================================
   UTILITY
   ============================================================ */
.plain { list-style: none; margin-left: 0; padding-left: 0; }
.plain li { margin-bottom: 0.22em; }
.editlink { font-size: 0.75rem; font-weight: normal; float: right; color: #3366cc; }
.nowrap { white-space: nowrap; }
.small { font-size: 0.9em; color: #54595d; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 760px) {
  body { font-size: 0.9375rem; }
  .content { padding: 1em 0.9em 1.2em; border-left: 0; border-right: 0; }
  .shell { padding: 0 0 2em; }
  .infobox { float: none; width: 100%; margin: 0 0 1.2em; }
  .firstHeading { font-size: 1.6rem; }
  .content h2 { font-size: 1.3rem; }
  .tabs { gap: 0.8em; overflow-x: auto; }
  .tabs .tab-group { gap: 0.8em; }
  .brand-search { width: 100%; margin-left: 0; }
  .brand-search input { width: 100%; max-width: none; }
  .toc { display: block; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body { background: #fff; font-size: 10pt; }
  .site-header, .tabs, .brand-search, .toctoggle, .editlink { display: none; }
  .content { border: 0; padding: 0; }
  a { color: #000; text-decoration: none; }
  a.external::after { display: none; }
  .infobox { float: none; width: 100%; }
}
