/* ===== Page styles (was tinker.module.css; classes prefixed t-) ===== */
.t-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.t-narrow {
  max-width: 760px;
}

.t-center {
  text-align: center;
}

.t-centerRow {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.t-section {
  padding: clamp(56px, 9vw, 96px) 0;
}

.t-section h2.t-center {
  margin-bottom: 12px;
}

.t-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
}

.t-fineprint {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--muted);
}

.t-textLink {
  font-weight: 600;
  text-decoration: none;
}

.t-textLink:hover {
  text-decoration: underline;
}

/* Navigation */
.t-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.t-navInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.t-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.t-navLinks {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.5vw, 26px);
  font-size: 0.95rem;
}

.t-navLinks a {
  color: var(--text);
  text-decoration: none;
}

.t-navLinks a:hover {
  color: var(--link);
}

.t-navLinks a.t-navCta {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
}

.t-navLinks a.t-navCta:hover {
  color: #fff;
  filter: brightness(1.08);
}

@media (max-width: 560px) {
  .t-navLinks a:not(.t-navCta):nth-child(3) {
    display: none;
  }

  .t-brand {
    font-size: 1rem;
  }
}

/* Buttons */
.t-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.t-btnPrimary,
.t-btnSecondary {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.t-btnPrimary {
  background: linear-gradient(180deg, #088050, #07703f);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(8, 122, 75, 0.6);
}

.t-btnSecondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

a.t-btnPrimary:hover,
a.t-btnSecondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.t-btnDisabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.t-btnNote {
  font-size: 0.72rem;
  font-weight: 700;
  color: inherit;
}

/* Visible placeholder for an owner's open item. */
.t-tbd {
  display: inline-block;
  padding: 2px 10px;
  border: 2px dashed #b88a00;
  border-radius: 8px;
  background: #fff6cc;
  color: #5c4500;
  font-size: 0.85rem;
  font-weight: 700;
}

.t-draft {
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 2px dashed #b88a00;
  border-radius: 10px;
  background: #fff6cc;
  color: #5c4500;
  font-weight: 600;
}

/* Hero */
.t-hero {
  padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(60% 70% at 85% 30%, color-mix(in srgb, var(--green-1) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 10%, color-mix(in srgb, var(--sparkle) 18%, transparent), transparent 70%);
}

.t-heroGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.t-heroText h1 {
  margin-top: 20px;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
}

.t-heroText .t-lead {
  margin-top: 16px;
  max-width: 34ch;
}

.t-heroIcon {
  filter: drop-shadow(0 10px 18px rgba(11, 138, 85, 0.3));
}

.t-heroDemo {
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .t-heroGrid {
    grid-template-columns: 1fr;
  }
}

/* Headline feature cards */
.t-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 36px 0 28px;
}

/* Six cards: three per row on wide screens, so they never wrap 5 + 1 */
@media (min-width: 900px) {
  .t-cardsThree {
    grid-template-columns: repeat(3, 1fr);
  }
}

.t-card {
  height: 100%;
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.t-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 1.2rem;
}

.t-card p {
  color: var(--muted);
}

.t-cardIcon,
.t-bigIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-1), var(--green-2));
  color: #fff;
}

.t-bigIcon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.t-tagFree,
.t-tagPro {
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.t-tagFree {
  background: var(--mint);
  color: #075c39;
}

.t-tagPro {
  background: #fff1b8;
  color: #5c4500;
}

/* Demo video */
.t-video,
.t-videoPlaceholder {
  width: 100%;
  margin-top: 28px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--tint);
}

.t-videoPlaceholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

/* Privacy band */
.t-band {
  background: var(--tint);
  border-block: 1px solid var(--border);
}

.t-privateGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  gap: 40px;
}

.t-privateGrid h2 {
  margin-bottom: 12px;
}

.t-privateGrid .t-lead {
  margin-bottom: 16px;
}

.t-points {
  list-style: none;
  display: grid;
  gap: 14px;
}

.t-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.t-points svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* Plans */
.t-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.t-plan {
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.t-planPro {
  border: 2px solid var(--accent);
  box-shadow: 0 20px 40px -24px rgba(8, 122, 75, 0.5);
}

.t-plan h3 {
  font-size: 1.3rem;
}

.t-planPrice {
  margin: 6px 0 18px;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 800;
}

.t-planPrice span {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

.t-planLead {
  margin-bottom: 8px;
  font-weight: 600;
}

.t-checks {
  list-style: none;
  display: grid;
  gap: 10px;
}

.t-checks li {
  position: relative;
  padding-left: 26px;
}

.t-checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.t-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.t-facts li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tint);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
}

/* FAQ */
.t-faq {
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.t-faq details {
  border-bottom: 1px solid var(--border);
}

.t-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.t-faq summary::-webkit-details-marker {
  display: none;
}

.t-faq summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 200ms ease;
}

.t-faq details[open] summary::after {
  transform: rotate(45deg);
}

.t-faq details p {
  padding-bottom: 16px;
  color: var(--muted);
}

.t-requirements {
  margin-top: 40px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--tint);
  border: 1px solid var(--border);
}

.t-requirements ul {
  margin: 8px 0 0 20px;
}

/* Inner pages */
.t-pageHeader {
  padding: clamp(40px, 7vw, 72px) 0 28px;
  text-align: center;
}

.t-pageHeader h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.t-groupGrid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.t-group {
  height: 100%;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.t-group h2 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.t-group ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.t-group li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.t-groupNote {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

.t-prose {
  padding-bottom: 32px;
}

.t-prose h2 {
  margin: 36px 0 12px;
  font-size: 1.4rem;
}

.t-prose p,
.t-prose li {
  margin-bottom: 10px;
}

.t-prose ul,
.t-prose ol {
  padding-left: 22px;
}

.t-steps li {
  padding-left: 6px;
}

.t-contactCard {
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  background: var(--tint);
  border: 1px solid var(--border);
}

.t-contactCard h2 {
  font-size: 1.3rem;
}

.t-email {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.t-date {
  margin-left: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

/* Footer */
.t-footer {
  margin-top: 40px;
  padding: 48px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--tint);
  font-size: 0.95rem;
  color: var(--muted);
}

.t-footerGrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.t-footerGrid ul {
  list-style: none;
  display: grid;
  gap: 4px;
}

.t-footer a {
  color: var(--text);
  text-decoration: none;
}

.t-footer a:hover {
  color: var(--link);
  text-decoration: underline;
}

.t-footerGrid li a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.t-footerBrand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--text);
}

.t-copyright {
  margin-top: 32px;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .t-footerGrid {
    grid-template-columns: 1fr 1fr;
  }

  .t-footerGrid > div {
    grid-column: 1 / -1;
  }
}

.t-prose pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--tk-code-bg, rgba(127, 127, 127, 0.14));
  font-size: 0.9em;
}

/* ===== Colours and globals (was tinker.css) ===== */
/* Tinker: clean, native-Mac look. Colours come from the app icon. Light and dark follow the system. */
:root {
  color-scheme: light dark;
  --green-1: #34d07b;
  --green-2: #0b8a55;
  --accent: #0b8a55;
  /* #0b8a55 is 4.4:1 on white; buttons and links use this darker shade for AA (5.4:1). */
  --accent-strong: #087a4b;
  --mint: #ddf7e9;
  --sparkle: #ffe066;
  --sparkle-ink: #d9a400;
  --bg: #fbfdfc;
  --surface: #ffffff;
  --tint: #f0faf4;
  --text: #102019;
  --muted: #4c5d55;
  --border: rgba(16, 32, 25, 0.12);
  --window: #ffffff;
  --window-bar: #f6f7f6;
  --doc: #f4f6f5;
  --doc-selected: #e3efe8;
  --menu: rgba(246, 247, 246, 0.94);
  --link: #087a4b;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #34d07b;
    --bg: #0e1412;
    --surface: #161e1b;
    --tint: #13201a;
    --text: #edf5f0;
    --muted: #a3b3ab;
    --border: rgba(237, 245, 240, 0.13);
    --window: #1c2421;
    --window-bar: #222b28;
    --doc: #2a3430;
    --doc-selected: #20392d;
    --menu: rgba(40, 48, 45, 0.94);
    --link: #5fe09a;
    --sparkle-ink: #ffe066;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
}

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

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

/* ===== Accessibility baseline (shared base.css) ===== */
/* Shared accessibility + interaction baseline, imported by every root layout before the site's own CSS. */

/* Safety net: decorative motion must never cause sideways scrolling. clip (not hidden) keeps position: sticky working. */
body {
  overflow-x: clip;
}

:focus-visible {
  outline: 3px solid var(--accent, #1a63d6);
  outline-offset: 3px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Comfortable touch targets in navigation. */
nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Tactile press feedback. */
a[class],
button {
  -webkit-tap-highlight-color: transparent;
}

a[class]:active,
button:active {
  transform: scale(0.97);
}

/* Skip link: hidden until focused with the keyboard. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

#main:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  a[class]:active,
  button:active {
    transform: none;
  }
}

/* ===== Motion (was motion.module.css; classes prefixed m-) ===== */
/* Shared motion primitives. Every effect is disabled under prefers-reduced-motion. */

/* ---- Reveal on scroll ---- */
.m-reveal {
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.m-reveal[data-state='pending'] {
  opacity: 0;
}

.m-reveal[data-state='pending'][data-variant='up'] {
  transform: translateY(32px);
}

.m-reveal[data-state='pending'][data-variant='left'] {
  transform: translateX(-40px);
}

.m-reveal[data-state='pending'][data-variant='right'] {
  transform: translateX(40px);
}

.m-reveal[data-state='pending'][data-variant='zoom'] {
  transform: scale(0.92);
}

.m-reveal[data-state='pending'][data-variant='pop'] {
  transform: scale(0.6);
}

.m-fill {
  height: 100%;
}

/* Side slides would push past the screen edge on phones; rise instead. */
@media (max-width: 800px) {
  .m-reveal[data-state='pending'][data-variant='left'],
  .m-reveal[data-state='pending'][data-variant='right'] {
    transform: translateY(32px);
  }
}

/* Curtain wipe for images. */
.m-reveal[data-state='pending'][data-variant='clip'] {
  opacity: 1;
  clip-path: inset(0 0 100% 0 round 12px);
}

.m-reveal[data-variant='clip'] {
  clip-path: inset(0 0 0 0 round 12px);
  transition:
    clip-path 1s cubic-bezier(0.7, 0, 0.2, 1),
    opacity 0.7s;
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---- Hero entrance on page load (pure CSS, no JS) ---- */
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.m-enter {
  animation: enter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}

/* Word-by-word headline: each word rises from behind a mask. */
.m-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.m-wordInner {
  display: inline-block;
  animation: wordUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}

@keyframes wordUp {
  from {
    transform: translateY(105%);
  }
  to {
    transform: none;
  }
}

/* ---- Magnetic ---- */
.m-magnetic {
  display: inline-block;
  transform: translate(var(--mag-x, 0), var(--mag-y, 0));
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Scroll cue ---- */
.m-scrollCue {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: currentColor;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}

.m-scrollLine {
  position: relative;
  width: 1px;
  height: 40px;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 30%, transparent);
}

.m-scrollLine::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  animation: scrollLine 1.8s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}

@keyframes scrollLine {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@supports (animation-timeline: scroll()) {
  .m-scrollCue {
    animation: cueFade linear both;
    animation-timeline: scroll();
    animation-range: 0 160px;
  }

  @keyframes cueFade {
    to {
      opacity: 0;
    }
  }
}

/* ---- Parallax ---- */
.m-parallax {
  position: absolute;
  inset: -8% 0;
  will-change: transform;
}

/* ---- Tilt ---- */
.m-tilt {
  position: relative;
  height: 100%;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s ease-out;
  transform-style: preserve-3d;
}

.m-tilt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.25), transparent 55%);
  opacity: var(--glare-o, 0);
  transition: opacity 0.25s;
}

/* ---- Marquee ---- */
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.m-marquee {
  overflow: hidden;
  white-space: nowrap;
}

.m-marqueeTrack {
  display: inline-flex;
  animation: marquee var(--marquee-duration, 30s) linear infinite;
}

.m-marquee:hover .m-marqueeTrack {
  animation-play-state: paused;
}

.m-marqueeItem {
  display: inline-flex;
  align-items: center;
  gap: 1.5em;
  padding-right: 1.5em;
}

/* ---- Rotating word ---- */
.m-rotating {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
}

.m-rotatingWord {
  grid-area: 1 / 1;
  transition:
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.6s;
  transform: translateY(100%);
  opacity: 0;
}

.m-rotatingWord[data-active='true'] {
  transform: none;
  opacity: 1;
}

.m-rotatingWord[data-leaving='true'] {
  transform: translateY(-100%);
  opacity: 0;
}

/* ---- Float (gentle idle bob) ---- */
@keyframes float {
  50% {
    transform: translateY(-12px);
  }
}

.m-float {
  animation: float 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .m-reveal,
  .m-reveal[data-state='pending'] {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  .m-enter,
  .m-float,
  .m-marqueeTrack,
  .m-wordInner,
  .m-scrollLine::after {
    animation: none;
  }

  .m-reveal[data-variant='clip'] {
    clip-path: none !important;
  }

  .m-magnetic {
    transform: none !important;
  }

  .m-tilt {
    transform: none !important;
  }

  .m-rotatingWord {
    transition: none;
  }
}

/* ===== Finder demo (was FinderDemo.module.css; classes prefixed fd-) ===== */
.fd-demo {
  margin: 0;
  width: 100%;
  max-width: 640px;
}

.fd-window {
  position: relative;
  container-type: inline-size;
  height: 360px;
  border-radius: 14px;
  background: var(--window);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(11, 60, 40, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  user-select: none;
}

.fd-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--window-bar);
}

.fd-lights {
  display: flex;
  gap: 7px;
}

.fd-lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.fd-lights i:nth-child(2) {
  background: #febc2e;
}

.fd-lights i:nth-child(3) {
  background: #28c840;
}

.fd-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.fd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 8px;
  padding: 24px 18px;
}

.fd-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fd-doc {
  position: relative;
  width: 46px;
  height: 56px;
  border-radius: 4px 14px 4px 4px;
  background: var(--doc);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 7px;
}

.fd-doc em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  background: #6b7a72;
}

.fd-doc[data-kind='video'] em {
  background: #7a3ff2;
}

.fd-doc[data-kind='image'] em {
  background: #1f6fd1;
}

.fd-doc[data-kind='pdf'] em {
  background: #d1342f;
}

.fd-name {
  max-width: 100%;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--text);
}

.fd-selected .fd-doc {
  outline: 3px solid rgba(8, 122, 75, 0.35);
  outline-offset: 3px;
  background: var(--doc-selected);
}

.fd-selected .fd-name {
  background: var(--accent-strong);
  color: #fff;
}

.fd-fresh .fd-doc {
  animation: pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.fd-fresh .fd-doc::after {
  content: '✦';
  position: absolute;
  top: -10px;
  right: -12px;
  font-size: 18px;
  color: var(--sparkle-ink);
  animation: twinkle 900ms ease-out both;
}

.fd-fresh .fd-name {
  font-weight: 600;
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

@keyframes twinkle {
  from {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
  }
}

/* Cascading menus, positioned beside the selected file. */
.fd-menus {
  position: absolute;
  top: 46px;
  left: 72px;
  display: flex;
  align-items: flex-start;
  animation: menuIn 160ms ease-out both;
}

.fd-menu {
  list-style: none;
  min-width: 140px;
  padding: 5px;
  border-radius: 9px;
  background: var(--menu);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 12.5px;
  color: var(--text);
}

.fd-menu li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 5px;
  line-height: 18px;
  white-space: nowrap;
}

.fd-menu li b {
  margin-left: auto;
  padding-left: 14px;
  font-weight: 400;
  opacity: 0.6;
}

.fd-menu li.fd-active {
  background: var(--accent-strong);
  color: #fff;
}

.fd-menu li.fd-active b {
  opacity: 1;
}

.fd-menu .fd-sep {
  height: 1px;
  margin: 4px 6px;
  padding: 0;
  background: var(--border);
}

.fd-tinkerMark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, #34d07b, #0b8a55);
}

.fd-context {
  margin-top: 0;
}

.fd-groups {
  margin-top: 81px;
  margin-left: -6px;
}

.fd-actions {
  margin-top: calc(81px + 24px * var(--group-row, 0));
  margin-left: -6px;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Narrow windows: skip the first menu and start from the Tinker submenu. */
@container (max-width: 500px) {
  .fd-menus {
    left: 40px;
    top: 50px;
  }

  .fd-context {
    display: none;
  }

  .fd-groups {
    margin-top: 0;
    margin-left: 0;
  }

  .fd-actions {
    margin-top: calc(24px * var(--group-row, 0));
  }

  .fd-menu {
    min-width: 0;
  }
}

.fd-caption {
  margin-top: 14px;
  min-height: 3em;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.fd-caption strong {
  color: var(--text);
}

.fd-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.fd-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.fd-tabs button[aria-pressed='true'] {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .fd-fresh .fd-doc,
  .fd-fresh .fd-doc::after,
  .fd-menus {
    animation: none;
  }
}
