/* =============================================================================
   THE PERSON — Base CSS for Meeting Docs
   Source: stadiums/brand-book/project/colors_and_type.css
   Adaptations:
   - Gotham → Montserrat (web fallback) per ライセンス制約
   - UDShinGo → Noto Sans JP (web fallback)
   - 60/30/10 / 1.7 line-height / 8pt grid を厳格遵守
   ============================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;900&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap");

:root {
  /* ── Colors (60/30/10 LAW) ── */
  --tp-orange: #E2792E;          /* ≤10% accent only */
  --tp-orange-20: #FBE7D6;       /* AI / empty field fill */
  --tp-orange-dark: #8F3C00;
  --tp-off-white: #FFFFFB;       /* 60% surface */
  --tp-near-black: #1C1C1C;      /* 30% text */
  --tp-grey-700: #595858;
  --tp-grey-600: #666262;
  --tp-grey-400: #B4B5B4;
  --tp-grey-300: #CBCBCA;
  --tp-grey-200: #EBEBEB;
  --tp-success: #5CC26F;
  --tp-error: #DE4E4E;

  /* ── Surfaces ── */
  --tp-surface: var(--tp-off-white);
  --tp-surface-alt: var(--tp-grey-200);
  --tp-text: var(--tp-near-black);
  --tp-text-muted: var(--tp-grey-400);
  --tp-text-secondary: var(--tp-grey-700);
  --tp-border: var(--tp-grey-300);

  /* ── Shadows (rarely used) ── */
  --tp-shadow-md: 0 3px 6px rgba(0,0,0,0.161);

  /* ── Typography ── */
  --font-family: "Montserrat", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: var(--font-family);
  --font-jp: var(--font-family);

  /* ── Type scale (multiples of 12) ── */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-30: 30px;
  --fs-36: 36px;
  --fs-48: 48px;
  --fs-54: 54px;

  /* ── Line-heights (body 1.7+ NON-NEGOTIABLE) ── */
  --lh-tight: 1.0;
  --lh-display: 1.2;
  --lh-heading: 1.4;
  --lh-body: 1.7;
  --lh-relaxed: 2.0;

  /* ── Letter-spacing ── */
  --ls-tight: -0.022em;
  --ls-normal: 0;
  --ls-wide: 0.08em;
  --ls-wider: 0.12em;

  /* ── Radii ── */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-pill: 100px;
  --r-round: 9999px;

  /* ── Spacing (8pt grid) ── */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* ── Motion ── */
  --ease-standard: cubic-bezier(.2,.6,.2,1);
  --dur-base: 220ms;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

/* ── BODY ── */
body {
  font-family: var(--font-family);
  color: var(--tp-text);
  background: var(--tp-surface);
  font-size: var(--fs-14);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── TYPOGRAPHY (semantic, brand-aligned) ── */
.tp-h1 {
  font-weight: 700;
  font-size: var(--fs-36);
  line-height: var(--lh-heading);
  letter-spacing: 0.06em;
  color: var(--tp-text);
}
.tp-h2 {
  font-weight: 700;
  font-size: var(--fs-24);
  line-height: var(--lh-heading);
  color: var(--tp-text);
}
.tp-h3 {
  font-weight: 700;
  font-size: var(--fs-18);
  line-height: var(--lh-heading);
  color: var(--tp-text);
}
.tp-body {
  font-weight: 400;
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  text-wrap: pretty;
}
.tp-body-sm {
  font-size: var(--fs-14);
  line-height: var(--lh-body);
}
.tp-label {
  font-weight: 700;
  font-size: var(--fs-12);
  color: var(--tp-text-muted);
  letter-spacing: 0.02em;
}

/* EN display — Montserrat tracked uppercase (Gotham代替) */
.tp-en-caps {
  font-family: var(--font-en);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.tp-en-display {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: var(--fs-54);
  line-height: var(--lh-heading);
  letter-spacing: 0.01em;
  color: var(--tp-grey-300);
}
.tp-mono-date {
  font-family: var(--font-en);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── CARDS (flat, 1px border, no shadow) ── */
.tp-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--r-sm);
  padding: var(--s-5);
}

/* ── BUTTONS ── */
/* Primary pill (orange, max 1 per screen) */
.tp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  background: var(--tp-orange);
  color: var(--tp-off-white);
  border: none;
  border-radius: var(--r-pill);
  font-family: var(--font-en);
  font-weight: 500;
  font-size: var(--fs-14);
  letter-spacing: var(--ls-wide);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), transform 120ms;
}
.tp-btn-primary:hover { background: var(--tp-orange-dark); }
.tp-btn-primary:active { transform: scale(0.97); }

/* Secondary outlined */
.tp-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  background: transparent;
  color: var(--tp-text);
  border: 1px solid var(--tp-border);
  border-radius: var(--r-pill);
  font-family: var(--font-en);
  font-weight: 500;
  font-size: var(--fs-14);
  letter-spacing: var(--ls-wide);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-base);
}
.tp-btn-secondary:hover { border-color: var(--tp-near-black); }

/* Tab pill (text-only, underline indicator) */
.tp-tab {
  background: transparent;
  border: none;
  padding: var(--s-3) 0;
  margin-right: var(--s-12);
  color: var(--tp-text-secondary);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: var(--fs-14);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--dur-base);
}
.tp-tab:hover { color: var(--tp-text); }
.tp-tab.active { color: var(--tp-text); border-bottom-color: var(--tp-orange); font-weight: 700; }

/* ── CHIPS / PILLS ── */
.tp-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s-3);
  background: var(--tp-surface-alt);
  color: var(--tp-text-secondary);
  border-radius: var(--r-xs);
  font-family: var(--font-en);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.tp-chip.tp-chip-orange { background: var(--tp-orange-20); color: var(--tp-orange-dark); }
.tp-chip.tp-chip-success { background: rgba(92, 194, 111, 0.12); color: var(--tp-success); }

/* ── TASK ITEM (inline TODO from markdown - [ ] / - [x]) ── */
.tp-task {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  font-size: var(--fs-14);
  line-height: var(--lh-body);
  color: var(--tp-text);
  border-bottom: 1px solid var(--tp-grey-200);
}
.tp-task:last-child { border-bottom: none; }
.tp-task input[type="checkbox"] {
  margin-top: 6px;
  accent-color: var(--tp-orange);
  width: 16px; height: 16px;
  cursor: pointer; flex-shrink: 0;
}
.tp-task.done { color: var(--tp-text-muted); text-decoration: line-through; }

/* ── DIVIDER ── */
.tp-divider { border: none; border-top: 1px solid var(--tp-border); margin: var(--s-8) 0; }

/* ── LINKS ── */
a { color: var(--tp-text); text-decoration: underline; text-decoration-color: var(--tp-grey-300); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--tp-orange); }

/* ── MARKDOWN BODY ── */
.tp-prose h1 { font-size: var(--fs-30); font-weight: 700; line-height: var(--lh-heading); margin: var(--s-8) 0 var(--s-4); letter-spacing: 0.04em; }
.tp-prose h2 { font-size: var(--fs-20); font-weight: 700; line-height: var(--lh-heading); margin: var(--s-8) 0 var(--s-4); }
.tp-prose h3 { font-size: var(--fs-16); font-weight: 700; line-height: var(--lh-heading); margin: var(--s-6) 0 var(--s-3); color: var(--tp-text-secondary); }
.tp-prose h4 { font-size: var(--fs-14); font-weight: 700; margin: var(--s-5) 0 var(--s-2); color: var(--tp-text-muted); font-family: var(--font-en); letter-spacing: var(--ls-wide); text-transform: uppercase; }
.tp-prose p { font-size: var(--fs-16); line-height: var(--lh-body); margin: var(--s-3) 0; color: var(--tp-text); }
.tp-prose ul, .tp-prose ol { margin: var(--s-3) 0 var(--s-5) var(--s-6); font-size: var(--fs-14); line-height: var(--lh-body); }
.tp-prose ul li, .tp-prose ol li { margin: var(--s-1) 0; }
.tp-prose strong { font-weight: 700; color: var(--tp-text); }
.tp-prose em { font-style: italic; color: var(--tp-text-secondary); }
.tp-prose blockquote {
  border-left: 2px solid var(--tp-orange);
  padding-left: var(--s-4);
  margin: var(--s-5) 0;
  color: var(--tp-text-secondary);
  font-style: italic;
}
.tp-prose code { font-family: ui-monospace, "SF Mono", monospace; font-size: var(--fs-12); background: var(--tp-grey-200); padding: 2px 6px; border-radius: var(--r-xs); }
.tp-prose pre { background: var(--tp-grey-200); padding: var(--s-4) var(--s-5); margin: var(--s-5) 0; overflow-x: auto; border-radius: var(--r-sm); }
.tp-prose pre code { background: none; padding: 0; }
.tp-prose hr { border: none; border-top: 1px solid var(--tp-border); margin: var(--s-10) 0; }
.tp-prose a { color: var(--tp-text); border-bottom: 1px solid var(--tp-grey-300); text-decoration: none; }
.tp-prose a:hover { border-bottom-color: var(--tp-orange); }

/* Task list items in markdown */
.tp-prose ul li.task-list-item { list-style: none; margin-left: -24px; padding: var(--s-2) 0; display: flex; align-items: flex-start; gap: var(--s-3); border-bottom: 1px solid var(--tp-grey-200); }
.tp-prose ul li.task-list-item:last-child { border-bottom: none; }
.tp-prose ul li.task-list-item input[type="checkbox"] { margin-top: 6px; accent-color: var(--tp-orange); width: 15px; height: 15px; flex-shrink: 0; }
.tp-prose ul li.task-list-item.checked { color: var(--tp-text-muted); text-decoration: line-through; }
.tp-prose ul li.task-list-item.checked strong { color: var(--tp-text-muted); }
