/* ───────────────────────────────────────────────────────────────────────────
   Padum Playground — PADUM DIVING theme.

   Tokens lifted from the production theme at
   padum-diving.com/wp-content/themes/padum/assets/css/padum.css (v1.4.0),
   by way of gradientfactor.padum-diving.com: the deep-ocean page gradient,
   white glass cards, Oswald display over IBM Plex Sans, coral actions, and
   the 6/10/16/pill radius scale.

   The live site is dark only, so this page is too. Keeping the values
   identical to the sub-apps' own theme is the point -- the hub and the tools
   it links to should not look like two different products.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* ── brand palette (padum.css) ── */
  --padum-ocean:  #244D78;
  --padum-deep:   #16324F;
  --padum-sea:    #346B8F;
  --padum-lagoon: #539DB8;
  --padum-sky:    #95D1EB;
  --padum-coral:  #D2564E;
  --padum-coral-hover: #BC463F;
  --padum-sand:   #EEA570;
  --padum-sun:    #FAC669;

  --surface-page-top:  #14375A;
  --surface-page-mid:  #0E2740;
  --surface-page-deep: #0A1E33;
  --surface-card: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.045) 100%);

  --surface-1: #0A1E33;
  --ink:       #FFFFFF;
  --ink-2:     #D3D6DA;
  --ink-muted: #A2AAB2;
  --hairline:  rgba(255,255,255,.14);

  /* ── status ── */
  --st-good:    #0ca30c;
  --st-warning: #FAC669;
  --st-paused:  #A2AAB2;

  /* ── type ── */
  --font-display: "Oswald", "DIN Condensed", "Arial Narrow", sans-serif;
  --font-ui: "IBM Plex Sans", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --track-display: .06em;
  --track-eyebrow: .22em;
  --leading-body: 1.55;

  /* ── shape & motion ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 22px 46px rgba(4,14,26,.5), inset 0 1px 0 rgba(255,255,255,.16);
  --ring-focus: 0 0 0 3px rgba(83,157,184,.45);
  --blur-glass: saturate(130%) blur(14px);
  --ease-swell: cubic-bezier(.22,.61,.36,1);
  --dur-base: 200ms;

  --gap: 16px;
}

/* ─────────────────────────────── base ─────────────────────────────── */

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: var(--leading-body);
  color: var(--ink-2);
  background: var(--surface-page-deep);
  background-image: linear-gradient(180deg,
    var(--surface-page-top) 0%,
    var(--surface-page-mid) 45%,
    var(--surface-page-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { margin: 0; font-weight: 500; }
a { color: var(--padum-sky); text-decoration: none; }
a:hover { color: var(--ink); }

/* ─────────────────────────── masthead ─────────────────────────── */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 28px 22px;
  border-bottom: 1px solid var(--hairline);
}

.masthead__id { display: flex; align-items: flex-start; gap: 18px; }

.brand {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: block;
  /* The mark is a flat illustration with white keylines, so it reads on the
     dark ground unaided — no plate, no ring, no drop shadow. */
}

.masthead .rule {
  display: block;
  width: 62px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--padum-coral);
  margin-bottom: 14px;
}

.masthead h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.02;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  color: var(--ink);
}
.masthead h1 em { font-style: normal; color: var(--padum-coral); }

.masthead__sub {
  margin: 12px 0 0;
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.masthead__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.host-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--padum-sea);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* ─────────────────────────── layout ─────────────────────────── */

.shell {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap) 28px 48px;
}

/* ─────────────────────── panel (glass card) ─────────────────────── */

.panel {
  background: var(--surface-card);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 20px;
}

.panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink);
}

.panel__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--padum-sea);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ─────────────────────────── entries ─────────────────────────── */

.entries { display: flex; flex-direction: column; gap: 10px; }

.entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: inherit;
  transition: border-color var(--dur-base) var(--ease-swell),
              background var(--dur-base) var(--ease-swell);
}
.entry:hover { border-color: var(--padum-lagoon); background: rgba(83,157,184,.16); color: inherit; }
.entry:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.entry__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
}

.entry__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.entry__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.entry__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  color: var(--ink);
}

.entry__path { font-family: var(--font-mono); font-size: 12px; color: var(--padum-coral); }

.entry__blurb { font-size: 13px; color: var(--ink-muted); max-width: 68ch; }

/* Plain text, not a link: the whole row is already an <a>, and a nested one
   would be invalid. */
.entry__also {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ink-muted);
}

.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.entry__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.status .dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--st-paused); }
.status--live .dot { background: var(--st-good); }
.status--wip .dot  { background: var(--st-warning); }

/* Reads as the production .ghost-btn. It is a <span> because the whole entry
   is the link -- a nested <a> would be invalid and would fight the row's own
   hover state. */
.open-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  padding: 7px 14px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: border-color var(--dur-base) var(--ease-swell),
              background var(--dur-base) var(--ease-swell),
              color var(--dur-base) var(--ease-swell);
}
.entry:hover .open-btn {
  border-color: var(--padum-coral);
  background: rgba(210,86,78,.14);
  color: var(--ink);
}

/* ─────────────────────── empty state ─────────────────────── */

.empty {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed rgba(255,255,255,.20);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: var(--ink-muted);
  font-size: 12.5px;
}
.empty code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255,255,255,.10);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}

/* ─────────────────────────── footer ─────────────────────────── */

.foot {
  margin-top: auto;
  padding: 18px 28px 26px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.foot__id { display: flex; align-items: center; gap: 10px; }
.foot__mark { width: 26px; height: 26px; display: block; opacity: .85; }
.foot strong { color: var(--padum-coral); font-weight: 600; }

/* ─────────────────────────── narrow ─────────────────────────── */

@media (max-width: 720px) {
  .masthead { padding: 26px 20px 18px; }
  .masthead__id { gap: 14px; }
  .brand { width: 52px; height: 52px; }
  .masthead__meta { align-items: flex-start; width: 100%; }
  .shell { padding: var(--gap) 20px 32px; }
  .panel { padding: 16px 16px 18px; }

  /* The row collapses to a stack: mark and name on one line, then blurb,
     tags and the action. The 56px mark would otherwise squeeze the name
     into two or three words per line. */
  .entry { grid-template-columns: 48px minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .entry__mark { width: 48px; height: 48px; }
  .entry__body { grid-column: 2; }
  .entry__name { font-size: 19px; }
  .entry__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  /* 44px minimum hit target on touch. */
  .open-btn { min-height: 44px; padding: 0 20px; }

  .foot { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; }
}
