/*
 * Trinketz treatment for the JJ101 dashboard (owner-approved on Module 1,
 * 2 Oct 2026; now applied to all 11 modules). Loaded after the dashboard's
 * own <style>: it overrides type, colour and the panel only. Wording, images,
 * background artwork, downloads and behaviour are untouched.
 *
 * Fonts: the approved site's families (src/app/layout.tsx) — Inter for prose
 * and controls, Playfair Display for titles and short subheadings, Ruthie for
 * the one drifting band under the course title (trinketz-ruthie.js).
 * Colours: the site's exact values (src/app/trinketz.css).
 * Case rule: uppercase for short headings and labels; mixed case for prose.
 *
 * Kept as content, not restyled: Module 7's palette chips (they show the
 * colours being taught), the wax seal and the bookmark charm.
 */

:root {
  --tk-inter: "Inter", ui-sans-serif, system-ui, sans-serif;
  --tk-playfair: "Playfair Display", Georgia, serif;
  --tk-ruthie: "Ruthie", cursive;
  --tk-cream: #fdfaf3;
  --tk-ivory: #f3ebdb;
  --tk-ink: #3b2e22;
  --tk-teal: #427880;
  --tk-brass: #a8823e;
  /* Teal deepened with 20% ink for small text on the ivory panel: 4.19:1
     becomes ~5.2:1 (WCAG AA). Full teal stays for fills and large type. */
  --tk-teal-text: color-mix(in srgb, var(--tk-teal) 80%, var(--tk-ink));
  --tk-hair: color-mix(in srgb, var(--tk-brass) 25%, transparent);
  /* Warm brown for the small logo: 55% ink + 45% brass (~#6c542e). */
  --tk-brown-sugar: color-mix(in srgb, var(--tk-ink) 55%, var(--tk-brass));

  /* Headings were Sepia Deep; the site's ink is one value. */
  --sepia-deep: var(--tk-ink);
}

/* Playfair defaults to old-style figures, which set "101" smaller than the
   capitals beside it. Lining figures everywhere in the dashboard. */
.masthead,
.module,
.contents,
.pager {
  font-variant-numeric: lining-nums;
}

/* =========================================================================
   Masthead: no logo; course title over the site's Ruthie band
   ========================================================================= */

/* The original black logo image stays hidden; in its place a small
   Trinketz wordmark in warm "brown sugar" — the site's ink mixed with its
   brass — drawn from the same logo file as a mask, so the artwork is exact
   and only the colour changes. */
.masthead img.brand-logo {
  display: none;
}

.masthead::before {
  content: "";
  display: block;
  width: clamp(96px, 9vw, 124px);
  aspect-ratio: 652 / 269;
  margin: 0 auto 14px;
  background: var(--tk-brown-sugar);
  -webkit-mask: url("trinketz-logo.webp") center / contain no-repeat;
  mask: url("trinketz-logo.webp") center / contain no-repeat;
}

/* The masthead clips the band at its lower edge, as the site's heading
   bands are clipped by the section below them. */
.masthead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Tighter opening (owner, 3 Oct 2026): the course starts sooner. */
  padding-top: clamp(40px, 4.5vw, 64px);
  padding-bottom: clamp(72px, 9vw, 130px);
}

.masthead h1 {
  font-family: var(--tk-playfair);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--tk-ink);
  margin-top: 0;
}

/* The tagline's words stay in the document for screen readers; what is
   seen is the decorative band built from them. */
.masthead p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The site's Ruthie band, exactly (trinketz.css [data-ruthie], globals.css
   .marquee-*): Deep Teal at 55%, 175 -> 406px on the 375-1600 fluid slope,
   80px between repeats, line-height 1, sinking off the lower edge, 25 px/s. */
.tk-ruthie-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  transform: translateY(40%);
  overflow: hidden;
  padding: 80px 0;
  pointer-events: none;
  user-select: none;
}

.tk-ruthie-track {
  display: flex;
  width: max-content;
  will-change: transform;
  font-family: var(--tk-ruthie);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  /* Savera’s bright Ruthie teal, site-wide (owner, 3 Oct 2026). */
  color: #58a7aa;
  opacity: 1;
  font-size: clamp(175px, calc(175px + 231 * (100vw - 375px) / 1225), 406px);
}

.tk-ruthie-run {
  display: flex;
  align-items: baseline;
}

.tk-ruthie-run > span {
  flex-shrink: 0;
  margin-right: 80px;
}

/* =========================================================================
   Controls: module bar and pager
   ========================================================================= */

.contents button,
.pager button {
  font-family: var(--tk-inter);
  letter-spacing: 0.01em;
}

.contents button {
  font-size: 14px;
  background: var(--tk-cream);
  color: var(--tk-ink);
  border-color: color-mix(in srgb, var(--tk-brass) 30%, transparent);
}

.contents button[aria-current="true"] {
  background: var(--tk-teal);
  color: var(--tk-cream);
  border-color: var(--tk-teal);
  font-weight: 600;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tk-teal) 25%, transparent);
}

/* The module strip scrolls sideways: a visible thumb and soft faded edges
   show there is more, and the selected module is kept in view (owner,
   3 Oct 2026). */
.contents {
  scroll-padding-inline: 48px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--tk-ink) 35%, transparent) transparent;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  padding-bottom: 16px;
}

.contents::-webkit-scrollbar {
  height: 6px;
}

.contents::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--tk-ink) 30%, transparent);
  border-radius: 3px;
}

/* Back to Trinketz: discreet, top left, above the page. */
.tk-back {
  position: absolute;
  top: 14px;
  left: 56px; /* clear of the stitched spine and the paper's dark edge */
  z-index: 30;
  font-family: var(--tk-inter);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--tk-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent);
  padding-bottom: 2px;
}

.tk-back:hover,
.tk-back:focus-visible {
  border-bottom-color: currentColor;
}

.contents button.visited::before {
  color: var(--tk-brass);
}

.contents button[aria-current="true"].visited::before {
  color: var(--tk-cream);
}

.pager button {
  font-size: 15px;
  color: var(--tk-ink);
}

:focus-visible {
  outline-color: var(--tk-teal);
}

/* =========================================================================
   The module panel: the dashboard's own card (rounded corners, Linen
   border, soft shadow, original padding) in Antique Ivory. No torn edges
   (owner decision, 2 Oct 2026).
   ========================================================================= */
.module {
  background: var(--tk-ivory);
  color: var(--tk-ink);
}

/* =========================================================================
   Module type
   ========================================================================= */

.module .mod-eyebrow {
  font-family: var(--tk-inter);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tk-teal-text);
}

/* A short brass rule under the module label. */
.module .mod-eyebrow::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin-top: 10px;
  background: var(--tk-brass);
}

.module h2 {
  font-family: var(--tk-playfair);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--tk-ink);
  margin-top: 6px;
}

.module h3 {
  font-family: var(--tk-playfair);
  font-weight: 600;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--tk-ink);
  margin-top: 32px;
  margin-bottom: 8px;
}

/* Prose: Inter at a reading size, lines narrowed to ~68 characters.
   Figures, card grids and diagrams keep the full module width. */
.module p,
.module li {
  font-family: var(--tk-inter);
  font-size: clamp(16px, 1.25vw, 17px);
  line-height: 1.7;
  max-width: 68ch;
  color: var(--tk-ink);
}

.module ul,
.module ol {
  max-width: 68ch;
}

.module strong {
  color: var(--tk-ink);
}

.module a:not([class]) {
  color: var(--tk-teal-text);
  text-decoration-color: color-mix(in srgb, var(--tk-teal) 45%, transparent);
  text-underline-offset: 3px;
}

.module figure img {
  border-color: var(--tk-cream);
}

.module figcaption,
.module .layers-caption {
  font-family: var(--tk-inter);
  font-style: normal;
  font-size: 13px;
  color: var(--tk-ink);
}

/* Decorative list stitches in brass. */
.module .stitched-list li::before {
  color: var(--tk-brass);
}

/* =========================================================================
   Cards laid on the sheet: Cream paper, a faint brass hairline
   ========================================================================= */

.module .video-card,
.module .post-card,
.module .style-chip,
.module .supply-card,
.module .quote-tag,
.module .freebie-card,
.module .tag-back {
  background: var(--tk-cream);
  border-color: var(--tk-hair);
}

.module .video-card .vc-tag,
.module .post-card .pc-tag {
  font-family: var(--tk-inter);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--tk-teal-text);
}

.module .video-card .vc-title,
.module .post-card .pc-title {
  font-family: var(--tk-inter);
  font-size: 15px;
  line-height: 1.45;
  color: var(--tk-ink);
}

.module .video-card .vc-play,
.module .post-card .pc-read {
  font-family: var(--tk-inter);
  font-style: normal;
  font-size: 13px;
  color: var(--tk-teal-text);
}

.module .video-card .vc-play::before {
  border-left-color: var(--tk-teal-text);
}

/* Module 2 style chips. */
.module .style-chip {
  font-family: var(--tk-inter);
  color: var(--tk-ink);
}

.module .style-chip .sc-mark {
  font-family: var(--tk-playfair);
  font-style: normal;
  font-weight: 600;
  color: var(--tk-ink);
}

.module .sc-watch a {
  font-family: var(--tk-inter);
  color: var(--tk-teal-text);
  border-color: var(--tk-teal-text);
}

.module .sc-watch a:hover {
  background: var(--tk-teal);
  color: var(--tk-cream);
}

/* Module 3 glossary: the pocket, its label and the tag backs. */
.module .pocket {
  background: color-mix(in srgb, var(--tk-cream) 55%, transparent);
  border-color: color-mix(in srgb, var(--tk-brass) 55%, transparent);
}

.module .pocket-label {
  font-family: var(--tk-inter);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tk-ink);
}

.module .tag-back {
  font-family: var(--tk-inter);
  font-size: 15px;
  line-height: 1.55;
  color: var(--tk-ink);
}

.module .tag-back b {
  font-family: var(--tk-playfair);
  font-weight: 600;
  color: var(--tk-ink);
}

.module .tag-hint {
  font-family: var(--tk-inter);
  font-style: italic;
  font-size: 14px;
  color: var(--tk-ink);
}

/* Module 4 supply cards. */
.module .supply-card h4 {
  font-family: var(--tk-playfair);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--tk-ink);
}

.module .supply-card p {
  font-size: 15px;
  line-height: 1.6;
}

.module .supply-card::before,
.module .quote-tag::before,
.module .stitch::after {
  background: var(--tk-brass);
}

/* Pulled quotes stay editorial: Playfair italic, mixed case. */
.module .quote-tag p {
  font-family: var(--tk-playfair);
  font-style: italic;
  color: var(--tk-ink);
}

/* Module 7 palette chips: colours unchanged (they are the lesson); only the
   label type joins the system. */
.module .chip {
  font-family: var(--tk-inter);
  font-size: 13px;
}

/* Module 11 freebies, print note, closing. */
.module .freebie-label {
  font-family: var(--tk-inter);
  font-size: 13px;
  color: var(--tk-ink);
}

.module .freebie-dl {
  font-family: var(--tk-inter);
  color: var(--tk-teal-text);
  border-color: var(--tk-teal-text);
}

.module .freebie-dl:hover {
  background: var(--tk-teal);
  color: var(--tk-cream);
}

/* Primary actions: Trinketz teal with a Cream label (4.76:1). Brass with a
   white label measured ~3:1, below AA, so brass stays decorative. */
.module .freebie-dl-all a,
.module .studio-door {
  font-family: var(--tk-inter);
  background: var(--tk-teal);
  color: var(--tk-cream);
}

.module .freebie-dl-all a:hover,
.module .studio-door:hover {
  background: var(--tk-teal-text);
  color: var(--tk-cream);
}

.module .print-note {
  font-family: var(--tk-inter);
  background: color-mix(in srgb, var(--tk-cream) 70%, transparent);
  border-left-color: var(--tk-teal);
  color: var(--tk-ink);
}

/* The closing line was script; it becomes the site's closing statement
   style (Playfair caps, as the homepage's "GIVE YOUR HISTORY A SECOND LIFE."). */
.module .closing-line {
  font-family: var(--tk-playfair);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-transform: none; /* prose: mixed case (owner typography pass, 3 Oct 2026) */
  color: var(--tk-ink);
  max-width: 30em;
  margin-inline: auto;
}

/* =========================================================================
   End-of-module promotion (one per module, rotating Collector / Quiz /
   Kit Builder). Same treatment as the homepage's primary action
   (.tk-cta-primary in src/app/trinketz.css): square 1px Ink outline,
   uppercase Inter, brass arrow; on hover it fills Antique Brass, turns
   Cream and rounds into a pill.
   ========================================================================= */

.module .tk-promo {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--tk-brass);
  text-align: center;
}

.module .tk-promo-line {
  margin: 0 auto 20px;
  max-width: 34em;
  font-family: var(--tk-playfair);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.4;
  color: var(--tk-ink);
}

.module .tk-promo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 0.85em 1.7em;
  font-family: var(--tk-inter);
  font-size: clamp(15px, 1.25vw, 17px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tk-ink);
  background: transparent;
  border: 1px solid var(--tk-ink);
  border-radius: 0;
  transition: background-color 400ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 400ms cubic-bezier(0.22, 1, 0.36, 1),
    color 400ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.module .tk-promo-arrow {
  width: 1.15em;
  height: 0.5em;
  flex: none;
  color: var(--tk-brass);
  transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1), color 400ms ease;
}

.module .tk-promo-cta:hover,
.module .tk-promo-cta:focus-visible {
  background: var(--tk-brass);
  border-color: var(--tk-brass);
  color: var(--tk-cream);
  border-radius: 999px;
}

.module .tk-promo-cta:hover .tk-promo-arrow,
.module .tk-promo-cta:focus-visible .tk-promo-arrow {
  color: var(--tk-cream);
  transform: translateX(0.18em);
}

@media (prefers-reduced-motion: reduce) {
  .module .tk-promo-cta,
  .module .tk-promo-arrow {
    transition: none;
  }
}

/* =========================================================================
   Module-change seal: the round mark that presses in on Next/Previous.
   Was a rose disc with a script "T"; now a Deep Teal disc carrying the
   authentic Trinketz T (/brand/trinketz-mark.webp, the mark in the site's
   navigation) in Cream. The press animation is unchanged.
   ========================================================================= */
.seal {
  background: radial-gradient(circle at 32% 30%,
    color-mix(in srgb, var(--tk-teal) 70%, var(--tk-cream)),
    var(--tk-teal) 55%,
    var(--tk-teal-text));
  font-size: 0;
  color: transparent;
}

.seal::before {
  content: "";
  width: 40%;
  aspect-ratio: 215 / 284;
  background: var(--tk-cream);
  -webkit-mask: url("/brand/trinketz-mark.webp") center / contain no-repeat;
  mask: url("/brand/trinketz-mark.webp") center / contain no-repeat;
}
