/* ==========================================================================
   OneStroke: Dot Connecting Game — Official Privacy Policy Stylesheet
   Design Direction: Refined, calm, high-contrast, accessible legal documentation
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Color Palette - Understated warm neutral canvas with deep charcoal text */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-subtle-hover: #e2e8f0;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  /* Typography Colors */
  --text-main: #0f172a;        /* High-contrast deep slate (WCAG AAA on white) */
  --text-muted: #334155;       /* Readable charcoal for body paragraphs */
  --text-subtle: #64748b;      /* Slate for secondary labels and dates */

  /* OneStroke Cyan Accent Palette (Inspired by game UI) */
  --accent-cyan: #0e7490;       /* Restrained Cyan-700 (High contrast link) */
  --accent-cyan-hover: #155e75; /* Cyan-800 */
  --accent-cyan-subtle: #ecfeff;/* Cyan-50 */
  --accent-cyan-border: #a5f3fc;/* Cyan-200 */

  /* Status Colors */
  --status-amber-bg: #fffbeb;
  --status-amber-border: #fde68a;
  --status-amber-text: #92400e;
  --status-amber-dark: #78350f;

  /* Elevation & Borders */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Reading measure */
  --content-max-width: 800px;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-page);
  color: var(--text-main);
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   A. Minimal Branded Header
   -------------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: #0f172a;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.775rem;
  color: var(--text-subtle);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  border: 1px solid var(--accent-cyan-border);
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   B. Main Reading Card & Document Layout
   -------------------------------------------------------------------------- */
.main-wrapper {
  flex: 1;
  max-width: var(--content-max-width);
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.document-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 680px) {
  .document-card {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-md);
  }
  .main-wrapper {
    margin: 1rem auto;
    padding: 0 0.875rem;
  }
}

/* Document Header & Metadata */
.doc-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.doc-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.doc-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.doc-metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.meta-value {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

.meta-value code {
  font-size: 0.825rem;
}

/* --------------------------------------------------------------------------
   Executive Plain-Language Summary Box
   -------------------------------------------------------------------------- */
.summary-card {
  background-color: #fafbfc;
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.5rem;
  margin-bottom: 2.25rem;
}

.summary-heading {
  font-size: 0.925rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.summary-bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  margin-top: 0.6rem;
}

/* --------------------------------------------------------------------------
   C. Table of Contents
   -------------------------------------------------------------------------- */
.toc-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.35rem 1.25rem;
  list-style: none;
}

.toc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  line-height: 1.4;
}

.toc-link:hover, .toc-link:focus-visible {
  color: var(--accent-cyan);
  background-color: var(--accent-cyan-subtle);
  text-decoration: none;
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-subtle);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   D. Policy Content Sections & Typography
   -------------------------------------------------------------------------- */
.policy-section {
  padding-top: 2.25rem;
  margin-top: 2.25rem;
  border-top: 1px solid var(--border-light);
}

.policy-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

h2 {
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.075rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.625rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.125rem;
  font-size: 0.975rem;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  color: var(--text-muted);
  margin-left: 1.35rem;
  margin-bottom: 1.125rem;
  font-size: 0.975rem;
  line-height: 1.65;
}

li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

li:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text-main);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--bg-subtle);
  color: #1e293b;
  padding: 0.15rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-cyan-hover);
}

/* Callout Highlights */
.callout-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  margin: 1.25rem 0;
}

.callout-box p {
  font-size: 0.925rem;
  margin-bottom: 0.5rem;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Data Disclosure Tables
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  line-height: 1.5;
}

th {
  background-color: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background-color: #fafbfd;
}

/* --------------------------------------------------------------------------
   Contact Card & Pre-Publication Status Alert
   -------------------------------------------------------------------------- */
.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

/* Action Notice Box */
.notice-box {
  background-color: var(--status-amber-bg);
  border: 1px solid var(--status-amber-border);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.notice-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--status-amber-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notice-box p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--status-amber-text);
  margin-bottom: 0.5rem;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.placeholder-badge {
  display: inline-block;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   E. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 2rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.footer-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0.25rem 0;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-link:hover, .footer-link:focus-visible {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   F. Reduced Motion & Print Styles
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .site-header, .toc-container, .notice-box, .site-footer {
    display: none;
  }
  .document-card {
    border: none;
    padding: 0;
    box-shadow: none;
  }
  a {
    color: #000000;
    text-decoration: underline;
  }
}
