/* The look of every public page, taken from the top page: its colours, its soft glow behind the top, its type. Then the header and footer
   (rendered by site.js), the buttons and chips the pages share, and what shows to visitors and to people who are signed in. */
:root {
  --bg: #fbfbfc; --fg: #16171a; --muted: #5f6470; --faint: #8b8f9a; --line: #e4e5e9; --card: #ffffff; --soft: #f3f3f6;
  --primary: #5e6ad2; --primary-soft: rgba(94, 106, 210, 0.1); --done: #3a9d6b; --warm: #d9822b; --agent: #8a5cd6;
  --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 12px 32px -12px rgba(20, 22, 30, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013; --fg: #ececef; --muted: #9a9ea8; --faint: #6c707b; --line: #272930; --card: #16171b; --soft: #1c1d22;
    --primary: #7580e0; --primary-soft: rgba(117, 128, 224, 0.16); --done: #4cb782; --warm: #e8964a; --agent: #a888ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1013; --fg: #ececef; --muted: #9a9ea8; --faint: #6c707b; --line: #272930; --card: #16171b; --soft: #1c1d22;
  --primary: #7580e0; --primary-soft: rgba(117, 128, 224, 0.16); --done: #4cb782; --warm: #e8964a; --agent: #a888ec;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg);
  font: 15px/1.7 "Geist Variable", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--primary-soft), transparent 70%); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1 { margin: 0; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: clamp(30px, 5vw, 46px); line-height: 1.22; letter-spacing: -0.025em; font-weight: 700; }
h1 em { font-style: normal; color: var(--primary); }
.lead { margin: 18px 0 0; font-size: 16.5px; color: var(--muted); max-width: 30em; }
.note { margin: 0; font-size: 13px; color: var(--faint); max-width: 28em; }
.note a, footer a { color: inherit; }
.pill { display: inline-flex; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.pill.primary { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* The buttons of the top page: the white Google button, and the quiet one beside it. */
.google { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 18px; border-radius: 12px; text-decoration: none;
  background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; font-size: 15.5px;
  box-shadow: 0 1px 2px rgba(20, 22, 30, 0.06); transition: box-shadow 0.15s, transform 0.15s; }
.google:hover { box-shadow: 0 4px 14px rgba(20, 22, 30, 0.16); transform: translateY(-1px); }
.google svg { width: 22px; height: 22px; flex: none; }
.ghost { display: inline-flex; align-items: center; height: 52px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px; }
.ghost:hover { border-color: var(--faint); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .google { transition: none; } }

/* The footer, the same on every page. */
footer { border-top: 1px solid var(--line); padding: 22px 0 32px; font-size: 12.5px; color: var(--faint); }

/* The header every public page shares (rendered by site.js), and what shows to visitors and to people who are signed in. */
.site-header { display: flex; align-items: center; justify-content: space-between; height: 64px; position: sticky; top: 0; z-index: 10; }
/* The veil under the header is as wide as the window (the header itself sits in the page column) and fades out at its lower edge,
   so it leaves no line where it meets the glow behind the top. */
.site-header::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 88px; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.site-header .brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.site-header .brand svg { width: 28px; height: 28px; }
.tools { display: flex; align-items: center; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: none; transition: color 0.15s, border-color 0.15s; }
.tool:hover { color: var(--fg); border-color: var(--faint); }
.tool svg { width: 16px; height: 16px; flex: none; }
.tool.icon { width: 34px; padding: 0; justify-content: center; }
.tool.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.tool.primary:hover { color: #fff; filter: brightness(1.08); }
/* The page you are on. */
.tool[aria-current="page"] { color: var(--fg); border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--card)); font-weight: 600; }
.tool .sun { display: none; }
:root[data-mode="dark"] .tool .sun { display: block; }
:root[data-mode="dark"] .tool .moon { display: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Visitors see data-guest, people who are signed in see data-member (site.js sets data-session). */
[data-member] { display: none !important; }
html[data-session="in"] [data-guest] { display: none !important; }
html[data-session="in"] [data-member] { display: inline-flex !important; }
@media (max-width: 520px) { .tool .label { display: none; } .tools { gap: 4px; } }
