/* The public page, under every template. The server inlines the theme as
   variables (--bg --card --text --muted --line --dot --accent --on-accent --r
   --font); everything here derives from those, so any theme fits any template. */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --soft-2: color-mix(in srgb, var(--accent) 22%, transparent);
  --raised: color-mix(in srgb, var(--card) 94%, var(--text));
  --hair: color-mix(in srgb, var(--line) 70%, transparent);
  /* Corners follow the theme but are capped per size, so "pill" stays sane on big cards. */
  --r-sm: min(var(--r), 10px);
  --r-md: min(var(--r), 16px);
  --r-lg: min(var(--r), 24px);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgb(15 20 30 / .05), 0 6px 20px -8px rgb(15 20 30 / .14);
  --shadow-lg: 0 2px 4px rgb(15 20 30 / .05), 0 22px 44px -16px rgb(15 20 30 / .28);
}
.is-dark {
  --raised: color-mix(in srgb, var(--card) 90%, var(--text));
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -10px rgb(0 0 0 / .5);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / .3), 0 28px 56px -18px rgb(0 0 0 / .7);
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
/* The backdrop (dot grid, gradient, board) is a fixed layer of its own, never
   background-attachment: fixed. A fixed body background repaints the whole
   viewport on every scroll frame and makes every glass card re-blur it; a
   composited layer scrolls for free. The theme's inline style sets its layers. */
body.profile::before {
  content: ""; position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none; transform: translateZ(0);
}
body.dotted::before { background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px); background-size: 22px 22px; }
/* Clear palettes: see-through shells. Cards are the shell's tint as frosted
   glass over the board in the backdrop (blurred away under them, so text never
   sits on traces). Text-heavy cards stay nearly solid; browsers without
   backdrop-filter get the solid composite. */
.glass :is(.card, .tile, .sc-card, .sp-card, .st-card, .tl-card, .sp-eyebrow, .sp-frame, .lk) {
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
}
.glass :is(.card, .tile, .sc-card, .sp-card, .st-card, .tl-card) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), var(--shadow); }
.glass .mn-lk .lk { -webkit-backdrop-filter: none; backdrop-filter: none; }
.glass :is(.sub-card, .sc-sub, .sp-about-card, .sp-sub, .tm-win, .st-sub, .mg-sub, .tl-sub, .notice-card, .pp-card) {
  background: color-mix(in srgb, var(--card-solid) 88%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { --card: var(--card-solid); }
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
p, h1, h2, h3 { margin: 0; }
/* Wrap between words, balanced; break inside a word only when it can't fit at all
   (page.js first shrinks a long name so that rarely happens). */
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
img { max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* A project's name is never cut short: it wraps to a second line between words
   (page.js shrinks one that still will not fit), and only then trims. */
strong.one-line { white-space: normal; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; text-wrap: balance; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- entrance motion: a short rise, staggered by --i. Not in the editor preview,
   which reloads on every keystroke, and never with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
  .is-preview .rise { animation: none; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
}

/* ---- avatar & logos ---- */
.avatar { display: block; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
.avatar-letter { display: inline-grid; place-items: center; background: linear-gradient(140deg, var(--soft-2), var(--soft)); color: var(--accent); font-weight: 700; }
.logo { display: block; border-radius: 22%; object-fit: cover; flex-shrink: 0; background: var(--card); }
.logo-letter { display: inline-grid; place-items: center; font-weight: 700; background: var(--soft); color: var(--accent); }

/* ---- bio ---- */
.bio { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.bio p + p, .bio p + blockquote, .bio blockquote + p, .bio blockquote + blockquote { margin-top: .75em; }
/* A quote the maker features under their bio (> in the bio, src/md.ts). */
.bio blockquote { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }
/* Each paragraph of maker text takes its own direction, so Arabic or Hebrew reads right to left. */
.bio p, [class*="desc"], [class*="details"], [class*="name"], [class*="title"], h1 { unicode-bidi: plaintext; }
.bio code { font-family: var(--mono); font-size: .88em; background: var(--raised); border: 1px solid var(--hair); padding: 0 5px; border-radius: 5px; }
.bio strong { color: var(--text); }

/* ---- the header's two rules (metaLine and pillRow in src/templates/parts.ts) ----
   1. One quiet meta line under the name: plain text, a middot between parts.
      Each part draws its own dot to its left; the line is pulled left by that
      much and clipped there, so a part that wraps starts its line clean. */
.meta {
  --sep: 17px;
  display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0;
  margin-left: calc(var(--sep) * -1); clip-path: inset(-8px -8px -8px var(--sep));
  color: var(--muted); font-size: 14px; line-height: 1.5;
}
.meta > * { position: relative; min-width: 0; margin-left: var(--sep); }
.meta > *::before { content: '·'; position: absolute; left: calc(var(--sep) * -1); width: var(--sep); text-align: center; font-weight: 700; color: color-mix(in srgb, var(--muted) 75%, transparent); pointer-events: none; }
/* 2. Pills and buttons in one row after the bio, all the same height. */
.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; letter-spacing: normal; text-transform: none; }
.pill-row > .otw, .pill-row > .cv, .pill-row > .mrr { height: 30px; padding: 0 12px 0 10px; font-size: 13px; line-height: 1; flex-shrink: 0; }
.pill-row > .cv { background: color-mix(in srgb, var(--card) 65%, transparent); }

/* ---- status ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid; flex-shrink: 0; }
.pill-ok { color: #19703f; background: #e7f6ed; border-color: #b4dfc4; }
.pill-warn { color: #855f12; background: #fbf3df; border-color: #e6d29f; }
.pill-info { color: #1957c2; background: #e8f0fd; border-color: #bcd2f5; }
.pill-bad { color: #ad2a22; background: #fdeceb; border-color: #efbcb8; }
/* Mokxi's dark chip palette, for the dark themes. */
.is-dark .pill-ok { color: #8ee0a1; background: #16271c; border-color: #2d5b3c; }
.is-dark .pill-warn { color: #e6c77a; background: #262013; border-color: #5c4c24; }
.is-dark .pill-info { color: #9cc9ff; background: #14223a; border-color: #284a73; }
.is-dark .pill-bad { color: #ff9a95; background: #2a1514; border-color: #6b2e2b; }

.dot-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tone-ok i { background: #22a35a; box-shadow: 0 0 0 3px rgb(34 163 90 / .16); }
.tone-warn i { background: #d99a1e; box-shadow: 0 0 0 3px rgb(217 154 30 / .16); }
.tone-info i { background: #3b82f6; box-shadow: 0 0 0 3px rgb(59 130 246 / .16); }
.tone-bad i { background: #dc4a40; box-shadow: 0 0 0 3px rgb(220 74 64 / .16); }

/* ---- revenue ---- */
.rev { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.verified { display: inline-grid; color: var(--accent); }
/* The headline revenue as a pill (revenuePill), for templates without a figure of their own. */
.mrr { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; white-space: nowrap; color: var(--muted); font-weight: 500; background: color-mix(in srgb, var(--card) 65%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.mrr strong { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---- tags ---- */
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.chip { font-size: 12px; line-height: 1.6; padding: 1px 9px; border-radius: 999px; background: var(--soft); color: var(--accent); white-space: nowrap; }

/* ---- screenshots: 16:10, with a drawn stand-in when there is none ---- */
.shot { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--raised); }
.shot > img { color: transparent; font-size: 0; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.shot-ph {
  display: grid; place-content: center; justify-items: center; gap: 12px;
  /* A real column width, so the name can use 80% of the card before it truncates. */
  grid-template-columns: minmax(0, 80%);
  background:
    radial-gradient(120% 90% at var(--gx, 15%) var(--gy, 10%), color-mix(in srgb, var(--accent) 34%, transparent), transparent 60%),
    radial-gradient(90% 80% at var(--hx, 100%) var(--hy, 100%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(var(--ga, 150deg), color-mix(in srgb, var(--card) 80%, var(--accent)), var(--card));
}
.shot-ph[data-seed='1'] { --gx: 90%; --gy: 0%; --hx: 0%; --hy: 100%; --ga: 200deg; }
.shot-ph[data-seed='2'] { --gx: 50%; --gy: 110%; --hx: 50%; --hy: -10%; --ga: 90deg; }
.shot-ph[data-seed='3'] { --gx: 0%; --gy: 60%; --hx: 100%; --hy: 20%; --ga: 240deg; }
.shot-ph[data-seed='4'] { --gx: 70%; --gy: 30%; --hx: 10%; --hy: 90%; --ga: 120deg; }
.shot-ph[data-seed='5'] { --gx: 20%; --gy: 100%; --hx: 90%; --hy: 0%; --ga: 300deg; }
.shot-ph-logo .logo { border-radius: 24%; box-shadow: var(--shadow-lg), 0 0 0 1px var(--hair); }
.shot-ph-name { max-width: 100%; font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: color-mix(in srgb, var(--text) 75%, transparent); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- socials, share, badge ---- */
.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); transition: color .2s, background .2s; }
.socials a:hover { color: var(--accent); background: var(--soft); }

.share {
  width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform .2s var(--ease), filter .2s;
}
.share:hover { transform: translateY(-1px); filter: brightness(1.08); }
.share:active { transform: scale(.96); }
.share.done { filter: brightness(1.2); }
.share-quiet { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.share-quiet:hover { color: var(--text); filter: none; }
.share-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .55); animation: share-fade .18s ease; }
.share-open { overflow: hidden; }
.share-dialog { width: min(100%, 460px); padding: 14px 16px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--card-solid, var(--card)); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .45); animation: share-in .2s var(--ease); }
.share-head { position: relative; display: grid; place-items: center; min-height: 36px; }
.share-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.share-x { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.share-x:focus { outline: none; }
.share-x:hover, .share-x:focus-visible { background: color-mix(in srgb, var(--text) 10%, transparent); }
.share-what { display: grid; gap: 2px; margin: 12px 0 16px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); text-align: center; }
.share-what strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-what span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.share-opts :is(a, button) { display: grid; justify-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.share-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: color-mix(in srgb, var(--text) 9%, transparent); transition: background .15s, transform .2s var(--ease); }
.share-ic svg { width: 22px; height: 22px; }
.share-l { font-size: 12.5px; font-weight: 550; }
.share-opts :is(a, button):hover .share-ic, .share-opts :is(a, button):focus-visible .share-ic { background: color-mix(in srgb, var(--text) 16%, transparent); }
.share-opts :is(a, button):active .share-ic { transform: scale(.94); }
.share-opts :is(a, button):focus-visible { outline: none; }
@keyframes share-fade { from { opacity: 0; } }
@keyframes share-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .share-sheet, .share-dialog { animation: none; } }
.share-toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 12px); opacity: 0; width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: rgba(20, 20, 20, .88); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; text-wrap: balance; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.share-toast.show { opacity: 1; transform: translate(-50%, 0); }

.badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-decoration: none;
  background: color-mix(in srgb, var(--card) 86%, transparent); color: var(--text); border: 0;
  box-shadow: var(--shadow); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.badge svg { color: var(--accent); }
/* The mark takes the theme: the accent behind the h, the text color on the accent for the h. */
.badge-mark .bm-bg, .badge-mark .bm-cut { fill: var(--accent); }
.badge-mark .bm-h { stroke: var(--on-accent); }
.badge-mark .bm-dot { fill: var(--on-accent); }

/* "Discover more makers" under every live page: quiet, and above the badge's corner. */
.discover { display: flex; justify-content: center; padding: 8px 16px 32px; }
/* Room for the fixed badge plus the phone's home indicator and Safari's floating toolbar. */
.discover.has-badge { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.discover a { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.discover a:hover { color: var(--text); background: var(--soft); }

/* "Maker #128" (makerNo in parts.ts): one more part of the meta line, the same for every maker. */
.maker-no { color: inherit; text-decoration: none; white-space: nowrap; transition: color .2s; }
.maker-no-n { font-variant-numeric: tabular-nums; }
.maker-no:hover { color: var(--text); }
/*
 * The ring: a band in the theme's accent around the photo and the Maker # tag
 * (when the maker number is shown) and the makerhandle badge. Rainbow (the
 * palette, the accent, or a custom theme's ring) brings its own colors
 * (--mh-ring, src/views.ts) and, with .ring-rainbow, its buttons.
 * The gradients are written on each element, never in a variable on :root:
 * one there would fix the angle once and nothing would move.
 */
@property --mh-spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
/* The accent's own ring: the accent, with only a faint highlight moving round it, so it reads as one even line in the accent color. */
:root { --mh-ring-accent: var(--accent), color-mix(in srgb, var(--accent) 85%, var(--text)), var(--accent), color-mix(in srgb, var(--accent) 85%, var(--text)), var(--accent); }
/* The photo is round, so the colors turn round it. */
.maker-glow .avatar-lead { padding: 2px; background: conic-gradient(from var(--mh-spin), var(--mh-ring, var(--mh-ring-accent))); box-shadow: none !important; animation: mh-spin 8s linear infinite; }
/* When the tag wraps under the location, it gets room from the line above. */
.maker-glow .meta { row-gap: 7px; }
.maker-glow .maker-no { position: relative; display: inline-flex; align-items: center; gap: .3em; padding: .36em .8em .3em; border-radius: 999px; line-height: 1.1; vertical-align: middle; color: var(--text); font-weight: 600; font-size: .92em; }
/* The tag and the badge are long pills: the colors slide along them at an even width instead of turning, which would stretch some and pinch others. */
.maker-glow .maker-no::after, .badge::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--mh-ring, var(--mh-ring-accent))) 0 0 / 200% 100% repeat-x;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: mh-slide 8s linear infinite;
}
@keyframes mh-spin { to { --mh-spin: 360deg; } }
@keyframes mh-slide { to { background-position: 200% 0; } }
/* Rainbow: every button filled with the accent runs through the colors, all together. */
.ring-rainbow :is(.share, .lk-hi, .sub-btn, .sp-cta, .notice-btn, .booking-btn, .booking-load, .biz-btn-maps, .badge-mark) { animation: mh-hue 12s linear infinite; }
@keyframes mh-hue { to { filter: hue-rotate(360deg); } }
/* Every other link button gets the rainbow edge, sliding like the tag's, with its icon cycling. */
.ring-rainbow .lk:not(.lk-hi) { border-color: transparent; }
.ring-rainbow .lk:not(.lk-hi)::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(90deg, var(--mh-ring)) 0 0 / 200% 100% repeat-x;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: mh-slide 8s linear infinite;
}
.ring-rainbow .lk:not(.lk-hi) .lk-ic { animation: mh-hue 12s linear infinite; }
/* and the bar beside a bio quote is the rainbow, sliding down it. */
.ring-rainbow .bio blockquote { border-left: 0; background: linear-gradient(180deg, var(--mh-ring)) 0 0 / 3px 200% repeat-y; animation: mh-slide-v 8s linear infinite; }
@keyframes mh-slide-v { to { background-position: 0 200%; } }
@media (prefers-reduced-motion: reduce) { .maker-glow .avatar-lead, .maker-glow .maker-no::after, .badge::after, .ring-rainbow .bio blockquote, .ring-rainbow .lk::after, .ring-rainbow .lk .lk-ic, .ring-rainbow :is(.share, .lk-hi, .sub-btn, .sp-cta, .notice-btn, .booking-btn, .booking-load, .biz-btn-maps, .badge-mark) { animation: none; } }

/* ---- subscribe: the same markup in every template ---- */
.sub-h { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.sub { min-width: 0; container-type: inline-size; }
/* In a narrow card (a phone, a small tile) the box centres, button under the field. */
@container (max-width: 420px) { .sub-h, .sub-msg, .sub-input { text-align: center; } .sub-link .sub-btn { display: flex; width: 100%; } }
.sub-msg:empty { min-height: 0; margin-top: 0; }
/* Side by side where there is room; in a narrow card the button drops below, full width. */
.sub-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; min-width: 0; }
.sub-input {
  flex: 1 1 190px; min-width: 0; height: 46px; padding: 0 15px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
.sub-input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.sub-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.sub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 46px; padding: 0 20px;
  border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: filter .2s, transform .2s var(--ease);
}
.sub-form .sub-btn { flex: 1 0 auto; }
.sub-btn:hover { filter: brightness(1.08); }
.sub-btn:active { transform: scale(.98); }
.sub-btn[disabled] { opacity: .6; cursor: default; }
.sub-link .sub-btn { margin-top: 12px; }
.sub-msg { margin-top: 10px; font-size: 13px; color: var(--muted); min-height: 1.4em; }
.sub.is-ok .sub-msg { color: var(--text); font-weight: 600; }
.sub.is-error .sub-msg { color: #dc4a40; }
.sub.is-ok .sub-form { display: none; }

/* ---- the contact form (Pro): the subscribe block's fields, a few more of them ---- */
.contact-form { display: grid; gap: 12px; margin-top: 14px; min-width: 0; }
.contact-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container (max-width: 420px) { .contact-pair { grid-template-columns: minmax(0, 1fr); } .sub-contact .sub-btn { width: 100%; } }
.contact-field { display: grid; gap: 6px; min-width: 0; }
.contact-field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.contact-opt { font-weight: 400; }
.contact-input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px; font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
.contact-text { height: auto; min-height: 120px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
.contact-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.contact-form .sub-btn { justify-self: start; }
.sub.is-ok .contact-form { display: none; }
.sub-contact.is-ok .sub-msg { font-size: 15px; margin-top: 12px; }

.empty { color: var(--muted); text-align: center; padding: 32px 16px; border: 1px dashed var(--line); border-radius: var(--r-md); }

/* ---- the confirm / unsubscribe page ---- */
.notice { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.notice-card { width: min(420px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center; padding: 36px 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.notice-card h1 { font-size: 24px; letter-spacing: -.02em; margin-top: 6px; }
.notice-card form { width: 100%; }
.notice-btn { display: inline-flex; justify-content: center; width: 100%; margin-top: 10px; padding: 12px 18px; border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.notice-link { font-size: 14px; color: var(--muted); }

/* Only the owner sees this, on their own page before they confirm their email. */
.owner-banner { position: sticky; top: 0; z-index: 50; padding: 10px 16px; text-align: center; font: 14px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--accent); color: var(--on-accent); }
.owner-banner a { color: inherit; font-weight: 600; text-decoration: underline; white-space: nowrap; }

/* ---- "Open to work" (pillRow in src/templates/parts.ts, and on project pages):
   the same green as the Active status dot, so it reads as "available" on any theme ---- */
.otw {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content; max-width: 100%; padding: 3px 11px 3px 9px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; text-decoration: none;
  color: #19703f; background: #e7f6ed; box-shadow: inset 0 0 0 1px #b4dfc4; transition: filter .2s;
}
.is-dark .otw { color: #8ee0a1; background: #16271c; box-shadow: inset 0 0 0 1px #2d5b3c; }
.otw i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #22a35a; box-shadow: 0 0 0 3px rgb(34 163 90 / .18); }
a.otw:hover { filter: brightness(.97) saturate(1.1); }
/* The resume beside it: a quiet outlined pill in the page's own colors. */
.cv {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--text); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line); transition: color .2s, box-shadow .2s;
}
.cv svg { color: var(--muted); flex-shrink: 0; transition: color .2s; }
.cv:hover { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cv:hover svg { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .otw i { animation: otw-pulse 2.4s ease-in-out infinite; }
  @keyframes otw-pulse { 50% { box-shadow: 0 0 0 5px rgb(34 163 90 / .06); } }
}

/* The mini revenue chart beside a verified figure (miniSpark in src/templates/parts.ts). */
.rev-spark { display: inline-block; vertical-align: middle; flex-shrink: 0; overflow: visible; }
.rev-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rev-group { display: inline-flex; align-items: center; gap: 8px; }
.rev-group .rev { margin-left: 0; }
.card-meta .rev-group, .sc-meta .rev-group, .st-meta .rev-group { margin-left: auto; }

/* ---- custom links (linkList in src/templates/parts.ts): full-width buttons,
   icon on the left, title centred, an arrow that shows on hover; templates restyle ---- */
.links { display: grid; gap: 10px; min-width: 0; }
.lk {
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 14px; min-width: 0;
  background: var(--card); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
  transition: transform .35s var(--ease), border-color .2s, box-shadow .35s var(--ease), background .2s;
}
.lk-ic { display: grid; place-items: center; width: 28px; height: 28px; color: var(--accent); }
.lk-fav { display: block; border-radius: 6px; object-fit: contain; }
.lk-emoji { line-height: 1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.lk-t { text-align: center; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; unicode-bidi: plaintext; }
.lk-end { display: grid; place-items: center; color: var(--muted); opacity: 0; transform: translate(-3px, 3px); transition: opacity .25s, transform .35s var(--ease); }
@media (hover: hover) {
  .lk:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
  .lk:hover .lk-end { opacity: 1; transform: none; }
}
.lk:active { transform: scale(.99); }
/* The highlighted link: filled with the accent. */
.lk-hi { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.lk-hi .lk-ic, .lk-hi .lk-end { color: var(--on-accent); }
.lk-hi .lk-fav { background: #fff; padding: 2px; border-radius: 7px; }
@media (hover: hover) { .lk-hi:hover { border-color: transparent; filter: brightness(1.06); box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 75%, transparent); } }
/* Scheduled links (src/links.ts). Before it opens, a link that asked for a
   countdown is a quiet, unclickable button with the time left (page.js ticks
   it and reloads the page when it opens). The owner's preview shows every
   scheduled link with its schedule; one not live now is dimmed. */
.links > .lk.lk-soon { grid-template-columns: auto minmax(0, 1fr) auto; cursor: default; border-style: dashed; background: transparent; color: var(--muted); }
.lk-soon .lk-ic { color: var(--muted); }
.lk-cd { white-space: nowrap; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .lk.lk-soon:hover { transform: none; box-shadow: none; border-color: var(--line); } }
.lk-sched { opacity: .62; border-style: dashed; }
.lk-sched-note { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 2px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.lk-hi .lk-sched-note { color: inherit; opacity: .85; }
.lk-t:has(.lk-sched-note) { -webkit-line-clamp: 3; }

/* The editor's preview frame scrolls without a scrollbar, like the phone it stands for. */
html:has(body.is-preview) { scrollbar-width: none; }
html:has(body.is-preview)::-webkit-scrollbar, body.is-preview::-webkit-scrollbar { display: none; }

/* A divider the maker put above a project (sectionBreak in src/templates/parts.ts): a line, or a title and a line. */
.p-section { grid-column: 1 / -1; list-style: none; display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; padding: 0; border: 0; background: none; }
.p-section::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.p-section-line { margin: 6px 0; }
/* A line that starts the list sits as far below what is above it as above the first card. */
.p-section-line:first-child { margin-top: -10px; }
.p-section-h { margin: 0; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80%; }
.p-section:not(.p-section-line):first-child { margin-top: 0; }
.tm .p-section-h::before { content: '# '; color: var(--accent); }
