/* =============================================================
 * ticketdive.com メールアドレスフォーム解析レポート
 * Diver Design System v1.0 に準拠
 * ============================================================= */

:root {
  /* ---- Brand ---- */
  --pink:   #FE3A83;
  --purple: #8630CD;
  --blue:   #1332BA;
  --navy:   #0E1878;

  /* ---- Surfaces ---- */
  --paper:   #FFFFFF;
  --paper-2: #FAFAFB;
  --paper-3: #F2F2F5;
  --bg:      #F2F2F5;

  /* ---- Ink ---- */
  --ink:   #15151E;
  --ink-2: #4A4A5A;
  --ink-3: #8E8E9A;

  /* ---- Rules ---- */
  --rule:        #E6E6EC;
  --rule-strong: #C5C5CC;

  /* ---- Brand gradients ---- */
  --brand-gradient:   linear-gradient(135deg, #FE3A83 0%, #8630CD 50%, #1332BA 100%);
  --brand-gradient-h: linear-gradient(90deg,  #FE3A83 0%, #8630CD 50%, #1332BA 100%);

  /* ---- Spacing ---- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;

  /* ---- Fonts ---- */
  --font-body:    'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-display: 'Fraunces', 'Zen Old Mincho', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.85;
  font-feature-settings: "palt";
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================
 * Page wrapper — "paper" 感
 * ============================================================= */
.page {
  position: relative;
  max-width: 820px;
  margin: 32px auto;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(13, 13, 26, 0.04), 0 24px 60px rgba(13, 13, 26, 0.08);
}

.page::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--brand-gradient-h);
}

.page-inner {
  padding: 72px 64px;
}

/* =============================================================
 * Cover
 * ============================================================= */
.cover {
  min-height: 640px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-lg);
}

.cover-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: block;
}

.cover-meta {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  line-height: 1.7;
}

.cover-meta strong {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.cover-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
}

.cover-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.cover-eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--brand-gradient-h);
  display: inline-block;
}

.cover-title {
  font-family: var(--font-body);
  font-size: 46px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0;
}

.cover-title em {
  font-style: normal;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.cover-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.65;
}

.cover-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--rule);
  padding-top: var(--space-md);
  font-size: 12px;
  color: var(--ink-2);
}

.cover-footer .label {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.cover-footer .name {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}

.cover-footer .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

/* =============================================================
 * Section header
 * ============================================================= */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}

.section-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  background: var(--brand-gradient-h);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  flex-shrink: 0;
}

.section-num::before {
  content: "§ ";
}

.section-head h2 {
  font-family: var(--font-body);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
}

section {
  margin-top: 56px;
}

section:first-of-type {
  margin-top: 0;
}

section > p { margin: 0 0 16px; }

h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--ink);
}

a {
  color: var(--ink);
  text-decoration: none;
  background-image: var(--brand-gradient-h);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1.5px;
  padding-bottom: 1px;
}

/* =============================================================
 * Callout
 * ============================================================= */
.callout {
  background: var(--paper-2);
  padding: 18px 24px;
  margin: 24px 0;
  border-left: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
  border-image-slice: 1;
}

.callout-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 4px;
}

.callout p {
  margin: 0;
  color: var(--ink);
}

/* =============================================================
 * Feature list
 * ============================================================= */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.feature-list li {
  padding: 12px 0 12px 36px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  width: 18px;
  height: 1.5px;
  background: var(--brand-gradient-h);
}

.feature-list li strong {
  font-weight: 700;
  display: inline;
  margin-right: 0.5em;
}

.feature-list li:last-child {
  border-bottom: none;
}

/* =============================================================
 * Code blocks
 * ============================================================= */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-3);
  border-radius: 3px;
  padding: 1px 5px;
  font-feature-settings: "tnum";
}

pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--paper-2);
  border-left: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
  border-image-slice: 1;
  padding: 16px 20px;
  margin: 18px 0;
  overflow-x: auto;
  color: var(--ink);
}

pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* =============================================================
 * Tables
 * ============================================================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13.5px;
}

table thead th {
  text-align: left;
  font-weight: 700;
  padding: 10px 8px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  letter-spacing: 0;
}

table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink);
}

table .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
}

table tr.total td {
  background: var(--paper-2);
  font-weight: 700;
}

/* table chip for OK / NG */
.chip {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
}

.chip.ok    { color: var(--ink); border-color: var(--ink); }
.chip.ng    { color: var(--pink); border-color: var(--pink); }

/* =============================================================
 * Figures (screenshots)
 * 撮影元: モバイル (375〜430 dp) のスクショ。実機の縦長感を残したいので
 * デスクトップでも画像幅は 360px までに抑える。
 * ============================================================= */
.figure {
  margin: 24px 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.figure-frame {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.figure img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.figure-caption {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 4px;
  align-items: baseline;
}

.figure-caption .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.figure-caption .body {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* =============================================================
 * Typo-domain grid (custom block for this report)
 * ============================================================= */
.domain-group {
  margin: 24px 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.domain-group h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.domain-group h4 .canon {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 700;
}

.domain-group h4 .count {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 12px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.domain-grid li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0;
  padding: 2px 0;
}

/* =============================================================
 * Footer
 * ============================================================= */
.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  margin-top: 56px;
}

.page-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-footer-logo img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.page-footer-logo span {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--ink-2);
}

/* =============================================================
 * Mobile (≤640px)
 * ============================================================= */
@media (max-width: 640px) {
  .page { margin: 0; box-shadow: none; }
  .page-inner { padding: 40px 24px; }
  .cover { min-height: auto; }
  .cover-title { font-size: 30px; }
  .cover-header { flex-direction: column; gap: 12px; }
  .cover-meta { text-align: left; }
  .cover-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-head { flex-wrap: wrap; gap: 12px; }
  .section-head h2 { font-size: 20px; }
  pre { font-size: 11.5px; padding: 12px 14px; }
  table { font-size: 12.5px; }
  table thead th, table tbody td { padding: 8px 6px; }

  /* Figure: full-bleed風にして余白の浪費を抑える */
  .figure { margin-left: -24px; margin-right: -24px; }
  .figure-frame {
    padding: 12px;
    border-left: none;
    border-right: none;
  }
  .figure img { max-width: 100%; }
  .figure-caption {
    padding: 0 24px;
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
  .figure-caption .num { font-size: 10px; }
  .figure-caption .body { font-size: 12px; }
}

/* =============================================================
 * Print
 * ============================================================= */
@media print {
  body { background: white; }
  .page { box-shadow: none; margin: 0; max-width: 100%; }
  .page-inner { padding: 28mm 22mm; }
  .cover { page-break-after: always; }
  section { page-break-inside: avoid; }
  pre, table { page-break-inside: avoid; }
  a { background-image: none; padding-bottom: 0; }
}
