/* PublishMe18 shared public-page theme.
   Used by public, non-login pages only (home, BarTaps).
   Palette matches the existing home page; tokens are reusable. */

:root {
  --pm18-ink: #1a1a1a;
  --pm18-muted: #4a4a4a;
  --pm18-paper: #f7f3ea;
  --pm18-paper-2: #ebe4d6;
  --pm18-surface: #ffffff;
  --pm18-line: #cfc6b8;
  --pm18-accent: #2f5d50;
  --pm18-accent-2: #8b5a2b;
  --pm18-radius: 10px;
  --pm18-font: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
  --pm18-font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.pm18-theme {
  margin: 0;
  font-family: var(--pm18-font);
  color: var(--pm18-ink);
  background: linear-gradient(165deg, var(--pm18-paper) 0%, var(--pm18-paper-2) 100%);
  min-height: 100vh;
}

/* Re-skin widgets that use the --hatch-widget-* variables (BarTaps). */
body.pm18-theme {
  --hatch-widget-text: var(--pm18-ink);
  --hatch-widget-muted: var(--pm18-muted);
  --hatch-widget-border: var(--pm18-line);
  --hatch-widget-surface: var(--pm18-surface);
  --hatch-widget-surface-muted: var(--pm18-paper-2);
  --hatch-widget-accent: var(--pm18-accent);
  --hatch-widget-on-accent: #ffffff;
}

.pm18-wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.pm18-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 28px 0 4px;
}
.pm18-sub { margin: 0 0 20px; color: var(--pm18-muted); font-size: 1.05rem; }

/* One flat block: no cards, no inner boxes. Sections are separated by thin rules only. */
.pm18-linktree { padding-top: 14px; font-family: var(--pm18-font-ui); }
.pm18-linktree-toggle {
  font: inherit; font-weight: 600; cursor: pointer;
  color: var(--pm18-accent); background: none; border: 0; padding: 4px 0;
}
.pm18-linktree-toggle:hover { text-decoration: underline; }
.pm18-linktree-list { list-style: none; margin: 4px 0 0; padding: 0 0 0 16px; display: grid; gap: 6px; }
.pm18-linktree-list[hidden] { display: none; }
.pm18-linktree-list a { color: var(--pm18-ink); text-decoration: none; overflow-wrap: anywhere; }
.pm18-linktree-list a:hover { color: var(--pm18-accent); text-decoration: underline; }
.pm18-linktree-list small { color: var(--pm18-muted); margin-left: 6px; }

/* Tiles: plain rows in a single list */
.pm18-tiles { display: block; padding: 8px 0 56px; border-top: 1px solid var(--pm18-line); }
.pm18-tile {
  display: block; text-decoration: none; color: var(--pm18-ink);
  background: none; border: 0; border-bottom: 1px solid var(--pm18-line);
  border-radius: 0; padding: 16px 0;
}
.pm18-tile:hover strong { text-decoration: underline; }
.pm18-tile strong { display: block; font-size: 1.15rem; color: var(--pm18-accent); margin-bottom: 4px; }
.pm18-tile span { color: var(--pm18-muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.pm18-tile img { display: block; max-width: 100%; height: auto; margin-bottom: 10px; }
.pm18-tile.soon { opacity: 0.7; pointer-events: none; }

/* Kobu: one compact line, image and label side by side, clickable */
.pm18-tile-feature { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 10px 0; }
.pm18-tile-feature img { flex: 0 0 auto; width: 48px; height: 32px; margin: 0; object-fit: contain; }
.pm18-tile-feature strong { display: inline; margin: 0; color: var(--pm18-accent-2); font-size: 1.15rem; }

/* Home control: the page title is the dropdown toggle */
.pm18-homebtn {
  font: inherit; font-family: var(--pm18-font); font-weight: 700; cursor: pointer;
  font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -0.02em;
  color: var(--pm18-ink); background: none; border: 0; padding: 0; margin: 28px 0 4px; text-align: left;
}
.pm18-homebtn:hover { color: var(--pm18-accent); }
.pm18-homebtn .pm18-caret { font-size: 0.6em; margin-left: 8px; color: var(--pm18-accent); }
.pm18-homelist { list-style: none; margin: 0 0 12px; padding: 0 0 0 16px; display: grid; gap: 8px; font-family: var(--pm18-font-ui); }
.pm18-homelist[hidden] { display: none; }
.pm18-homelist a { color: var(--pm18-ink); text-decoration: none; overflow-wrap: anywhere; }
.pm18-homelist a:hover { color: var(--pm18-accent); text-decoration: underline; }
.pm18-homelist small { color: var(--pm18-muted); margin-left: 6px; }
.pm18-sublinks { margin: 8px 0 0; padding: 0 0 0 16px; list-style: none; display: grid; gap: 4px; font-family: var(--pm18-font-ui); }
.pm18-sublinks a { color: var(--pm18-accent); text-decoration: none; }
.pm18-sublinks a:hover { text-decoration: underline; }
.pm18-tag { font-family: var(--pm18-font-ui); font-size: 0.8rem; color: var(--pm18-muted); margin-left: 8px; font-weight: 400; }

/* Back arrow in the breadcrumb (public themed pages only) */
.pm18-shell-back { margin-right: 8px; text-decoration: none; color: var(--pm18-accent); font-weight: 700; }
