@charset "UTF-8";
/* ==========================================================================
   Accidental 7 — theme
   Dark editorial theme shared by the index gallery and every sketch page.
   ========================================================================== */

:root {
  --paper: #0E0F12;
  --paper-2: #16181C;
  --paper-3: #1B1E23;
  --ink: #ECE7DB;
  --ink-soft: #C8C2B5;
  --mute: #7E7A72;
  --rule: #21242A;
  --rule-soft: #181B20;
  --accent: #FF8A66;
  --accent-q: #D7B98A;
  --selection: #3A2E26;

  /* ---- Typography, from "Tim Greenzweig — Portfolio Design System" ----
     Three families: Fraunces carries display and headings, Instrument Serif
     is the italic emphasis face, Inter handles body, labels and UI.
     Sizes are the design system's absolute px values expressed in rem;
     line-height and tracking are its percentages converted to unitless
     and em respectively. */
  --font-display: 'Fraunces', Georgia, serif;
  --font-em: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* kept so any rule still referencing the old names keeps working */
  --serif: var(--font-display);
  --sans: var(--font-sans);

  --t-hero: 6rem;           /* Display/Hero            96 / 100% / -2.8% */
  --t-foot-cta: 2.625rem;   /* Display/Foot CTA        42 / 110% / -1.8% */
  --t-h2: 2.125rem;         /* Heading/H2              34 / 120% / -1.2% */
  --t-h2-em: 1.5rem;        /* Heading/H2 Em           24 / 120% */
  --t-h3: 1.875rem;         /* Heading/H3              30 / 112% / -1.2% */
  --t-mark: 1.3125rem;      /* Heading/Mark            21 / 120% / -1%   */
  --t-lede: 1.25rem;        /* Body/Lede               20 / 160%         */
  --t-body: 0.9375rem;      /* Body/Default            15 / 160%         */
  --t-byline: 0.84375rem;   /* Body/Byline           13.5 / 140%         */
  --t-nav: 0.875rem;        /* UI/Nav                  14 / 140%         */
  --t-small: 0.78125rem;    /* UI/Small              12.5 / 150%         */
  --t-eyebrow: 0.71875rem;  /* Label/Eyebrow         11.5 / 140% / 22%   */
  --t-read: 0.71875rem;     /* Label/Read            11.5 / 140% / 14%   */
  --t-meta: 0.75rem;        /* Label/Meta              12 / 140% / 16%   */
  --t-footer-head: 0.6875rem; /* Label/Footer Head     11 / 140% / 22%   */
  --t-tag: 0.65625rem;      /* Label/Tag             10.5 / 140% / 8%    */
  --t-numeral: 2.375rem;    /* Numeric/Piece Number    38 / 100%         */

  --track-eyebrow: 0.22em;
  --track-meta: 0.16em;
  --track-read: 0.14em;
  --track-tag: 0.08em;
}

/* styles.css pins the root to 13px, which silently scaled every rem in this
   file to ~81% of its intended size. The design system's scale is absolute,
   so the root is restored to the browser default here. */
html { font-size: 100%; }

html, body {
  background: var(--paper) !important;
  color: var(--ink-soft);
  font-family: var(--font-sans);
}

/* Body/Default — on body only. Setting it on `html` too would make every
   rem in this file resolve against 15px instead of the 16px root. */
body {
  font-size: var(--t-body);
  line-height: 1.6;
}

body { -webkit-font-smoothing: antialiased; }

::selection { background: var(--selection); color: var(--ink); }

a { color: var(--accent); }

/* -------------------------------------------------------------------------
   Shared site header (index + every sketch page)
   ------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
/* Heading/Mark */
.site-header .brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-mark);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-header .brand:hover { color: var(--accent); }
/* UI/Nav */
.site-header nav.site-nav a {
  font-family: var(--font-sans);
  font-size: var(--t-nav);
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mute);
  text-decoration: none;
  margin-right: 24px;
}
.site-header nav.site-nav a:last-child { margin-right: 0; }
.site-header nav.site-nav a:hover { color: var(--ink); }
/* Label/Meta */
.site-header .header-meta {
  font-family: var(--font-sans);
  font-size: var(--t-meta);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-meta);
  color: var(--mute);
}
/* UI/Nav */
.site-header .back-link {
  font-family: var(--font-sans);
  font-size: var(--t-nav);
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-header .back-link:hover { color: var(--accent); }
/* Heading/Mark, with the sketch name set in the emphasis face */
.site-header .sketch-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-mark);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-style: normal;
  color: var(--ink-soft);
}
.site-header .sketch-title em {
  font-family: var(--font-em);
  font-style: italic;
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   Index: hero
   ------------------------------------------------------------------------- */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 48px;
}
/* Label/Eyebrow */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: var(--t-eyebrow);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--mute);
  margin-bottom: 28px;
}
.eyebrow .rule { width: 28px; height: 1px; background: var(--rule); display: inline-block; }
/* Display/Hero — capped at the design system's 96px, fluid below it */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 6.4vw, var(--t-hero));
  line-height: 1;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 16ch;
}
/* Display/Hero Em */
.hero h1 em {
  font-family: var(--font-em);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--accent);
}
/* Body/Lede */
.hero p.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--t-lede);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 32px;
}
/* UI/Small */
.hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--font-sans);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--mute);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.hero .meta-row strong { color: var(--ink-soft); font-weight: 500; }

/* -------------------------------------------------------------------------
   Index: sketch list
   ------------------------------------------------------------------------- */

.sketches {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 32px 96px;
}
.sketches-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
/* Heading/H2 */
.sketches-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
/* Heading/H2 Em */
.sketches-head h2 em {
  font-family: var(--font-em);
  font-style: italic;
  font-weight: 400;
  font-size: var(--t-h2-em);
  letter-spacing: 0;
  color: var(--mute);
}
/* Label/Meta */
.sketches-head .count {
  font-family: var(--font-sans);
  font-size: var(--t-meta);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-meta);
  color: var(--mute);
}

.sketch-list { list-style: none; margin: 0; padding: 0; }

.sketch-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 220px;
  gap: 24px;
  padding: 28px 16px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.sketch-row:hover { background: var(--paper-2); }

/* Numeric/Piece Number */
.sketch-row .row-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: normal;
  font-size: var(--t-numeral);
  line-height: 1;
  color: var(--accent);
  padding-top: 2px;
}

/* Heading/Mark */
.row-main h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-mark);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
}
.row-main h3 .file {
  font-family: var(--font-sans);
  font-size: var(--t-byline);
  letter-spacing: 0;
  color: var(--mute);
  font-weight: 400;
}
.row-main h3 em {
  font-family: var(--font-em);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}
/* Body/Default */
.row-main p {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--mute);
  margin: 0;
  max-width: 64ch;
}

.row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  text-align: right;
}
.row-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
/* Label/Tag */
.row-tags span {
  font-family: var(--font-sans);
  font-size: var(--t-tag);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-tag);
  color: var(--mute);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
/* Label/Read */
.view-link {
  font-family: var(--font-sans);
  font-size: var(--t-read);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-read);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.sketch-row:hover .view-link { text-decoration: underline; }

@media (max-width: 720px) {
  .sketch-row {
    grid-template-columns: 32px 1fr;
  }
  .row-meta {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
  }
  .row-tags { justify-content: flex-start; }
}

/* -------------------------------------------------------------------------
   Index: footer
   ------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 32px;
}
.site-footer .footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--mute);
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* -------------------------------------------------------------------------
   Sketch pages — restyle the legacy Processing/p5 control bar to match
   ------------------------------------------------------------------------- */

.proc_ui {
  background: var(--paper-2) !important;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 4% !important;
}
/* Body/Byline */
.proc_ui p {
  font-family: var(--font-sans) !important;
  font-size: var(--t-byline) !important;
  color: var(--ink-soft) !important;
  text-transform: none !important;
  float: none !important;
  width: auto !important;
  flex: 1 1 auto;
  margin: 0 !important;
  line-height: 1.4 !important;
}
/* Label/Read */
.proc_ui .ui-button,
input[type=button] {
  background: transparent !important;
  border: 1px solid var(--rule) !important;
  color: var(--ink-soft) !important;
  font-family: var(--font-sans) !important;
  font-size: var(--t-read) !important;
  line-height: 1.4;
  letter-spacing: var(--track-read);
  text-transform: uppercase;
  border-radius: 3px !important;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  float: none !important;
  width: auto !important;
  min-width: 0;
  max-width: none !important;
  height: 34px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  box-sizing: border-box;
  white-space: nowrap;
  flex: 0 0 auto;
}
.proc_ui .ui-button:hover,
input[type=button]:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
/* Body/Byline. The explicit size also overrides styles.css's legacy 1.25em,
   which would otherwise grow now that the root is back to 16px. */
input[type=text] {
  background: var(--paper-3) !important;
  border: 1px solid var(--rule) !important;
  color: var(--ink) !important;
  font-family: var(--font-sans) !important;
  font-size: var(--t-byline) !important;
  border-radius: 3px !important;
  padding: 0 10px !important;
  box-sizing: border-box;
}
/* Label/Eyebrow for control captions, Body/Byline for their readouts */
.control_label {
  font-family: var(--font-sans) !important;
  font-size: var(--t-eyebrow) !important;
  line-height: 1.4;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--mute) !important;
}
.textlabel {
  font-family: var(--font-sans) !important;
  font-size: var(--t-byline) !important;
  line-height: 1.4;
  font-weight: 400 !important;
  color: var(--mute) !important;
}
.proc_overlay {
  background: rgba(22, 24, 28, 0.92) !important;
  border: 1px solid var(--rule);
  width: auto !important;
  min-width: 220px;
  max-width: 320px;
}
.proc_overlay input[type=text] {
  font-size: var(--t-byline) !important;
  width: 100% !important;
  margin: 8px 0 !important;
}
.proc_overlay p {
  font-family: var(--font-sans) !important;
  font-size: var(--t-byline) !important;
  line-height: 1.4 !important;
}
.proc_overlay .labeledslider { box-sizing: border-box; width: 100% !important; }
.box_head, .box_desc {
  background: rgba(14, 15, 18, 0.85) !important;
}
.box_head h1 { color: var(--ink) !important; }
.box_desc p { color: var(--ink-soft) !important; }

/* -------------------------------------------------------------------------
   Sidebar sketch layout — controls panel to the left, canvas stage to the
   right, so the panel never overlaps the drawing (used by sketch_ex14.html).
   ------------------------------------------------------------------------- */

body.sketch-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.sketch-page .site-header { flex: 0 0 auto; }

.sketch-layout {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.sketch-panel {
  flex: 0 0 300px;
  width: 300px;
  box-sizing: border-box;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
  padding: 28px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
/* Body/Byline */
.panel-hint {
  font-family: var(--font-sans);
  font-size: var(--t-byline);
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0;
}
.panel-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Label/Eyebrow */
.panel-label {
  font-family: var(--font-sans);
  font-size: var(--t-eyebrow);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--mute);
}
.panel-group input[type=text] {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.sketch-panel .uislider {
  display: block !important;
  width: 100% !important;
  height: 6px;
  margin: 6px 0 !important;
}
.sketch-panel .control_label {
  text-transform: uppercase;
  font-size: var(--t-eyebrow) !important;
  letter-spacing: var(--track-eyebrow);
  margin: 0 !important;
  height: auto !important;
}
.sketch-panel .textlabel {
  font-size: var(--t-byline) !important;
  height: auto !important;
}
.panel-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.panel-actions .ui-button {
  flex: 1 1 auto;
}

.sketch-stage {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
}
.sketch-stage .stage-canvas {
  width: 100%;
  height: 100%;
}
.sketch-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.sketch-stage .stage-canvas > svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Body/Byline */
.stage-status {
  text-align: center;
  padding: 48px 0;
  color: var(--mute) !important;
  font-family: var(--font-sans) !important;
  font-size: var(--t-byline) !important;
  line-height: 1.4;
}

/* Right-hand variant of the controls panel (asset libraries). */
.sketch-panel--right {
  border-right: none;
  border-left: 1px solid var(--rule);
}

.panel-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
/* Label/Tag */
.panel-count {
  font-family: var(--font-sans);
  font-size: var(--t-tag);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-tag);
  color: var(--mute);
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.asset-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.asset-chip:hover { border-color: var(--mute); }
.asset-chip.is-selected {
  border-color: var(--accent);
  background: rgba(255, 138, 102, 0.08);
}
.asset-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--ink);
  border-radius: 3px;
  overflow: hidden;
}
.asset-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  line-height: 17px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--t-byline);
  color: var(--ink);
  background: rgba(14, 15, 18, 0.55);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.asset-remove:hover,
.asset-remove:focus-visible {
  background: var(--accent);
  color: var(--paper);
  outline: none;
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Label/Tag */
.asset-name {
  font-family: var(--font-sans);
  font-size: var(--t-tag);
  line-height: 1.4;
  letter-spacing: var(--track-tag);
  text-transform: uppercase;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-chip.is-selected .asset-name { color: var(--ink-soft); }

.asset-bulk {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}
/* Label/Read */
.link-button {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--t-read);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-read);
  color: var(--mute);
  cursor: pointer;
}
.link-button:hover { color: var(--accent); }

.upload-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-row input[type=file] { display: none; }
.upload-button {
  display: inline-block;
  text-align: center;
  padding: 9px 12px;
  border: 1px dashed var(--rule);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: var(--t-read);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: var(--track-read);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.upload-button:hover { border-color: var(--accent); color: var(--accent); }
/* UI/Small */
.upload-note {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--mute);
  margin: 0;
}
/* UI/Small */
.upload-error {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--accent);
  margin: 0;
}
.upload-error[hidden] { display: none; }

@media (max-width: 720px) {
  .sketch-layout { flex-direction: column; }
  .sketch-panel {
    flex: 0 0 auto;
    width: 100%;
    max-height: 55vh;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .sketch-panel--right {
    border-left: none;
    border-bottom: none;
    border-top: 1px solid var(--rule);
  }
  .sketch-stage { min-height: 320px; }
}
