/*
 * Tsunagaru-cho document presentation theme.
 * Loaded after page-local styles to give sales/trial materials a consistent polish.
 */
:root {
  --doc-navy: #0f2f52;
  --doc-blue: #1b5fa7;
  --doc-sky: #52b7df;
  --doc-mint: #66caa8;
  --doc-ink: #1b2838;
  --doc-muted: #5e7088;
  --doc-line: rgba(22, 54, 92, 0.14);
  --doc-soft: #f4f8fc;
  --doc-card: rgba(255, 255, 255, 0.94);
  --doc-shadow: 0 18px 48px rgba(15, 47, 82, 0.1);
  --doc-shadow-soft: 0 10px 26px rgba(15, 47, 82, 0.08);
  --doc-radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--doc-ink) !important;
  background:
    radial-gradient(circle at 10% -8%, rgba(82, 183, 223, 0.16), transparent 25rem),
    linear-gradient(180deg, #f7fbff 0%, #eef4fb 58%, #f8fbff 100%) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 47, 82, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 47, 82, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 72%);
  z-index: -1;
}

main,
body > section,
body > h1,
body > p,
body > div:not(.no-print) {
  position: relative;
}

main {
  padding-top: 2rem !important;
  padding-bottom: 4rem !important;
}

.hero,
.hero-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 247, 254, 0.96) 66%, rgba(237, 250, 246, 0.92) 100%) !important;
  border: 1px solid rgba(15, 47, 82, 0.12) !important;
  border-radius: 22px !important;
  box-shadow: var(--doc-shadow) !important;
}

.hero::after,
.hero-card::after {
  content: "";
  position: absolute;
  right: -72px;
  top: -92px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(53, 185, 232, 0.28), transparent 62%),
    radial-gradient(circle at 30% 70%, rgba(50, 194, 143, 0.22), transparent 46%);
}

h1 {
  color: var(--doc-navy) !important;
  letter-spacing: -0.025em;
  border-bottom-color: transparent !important;
}

h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--doc-navy) !important;
  border-bottom: 0 !important;
  letter-spacing: -0.01em;
}

h2::before {
  content: "";
  width: 0.28rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--doc-navy);
  box-shadow: none;
  flex: 0 0 auto;
}

h3 {
  color: var(--doc-navy) !important;
}

.eyebrow {
  color: var(--doc-blue) !important;
  letter-spacing: 0.12em !important;
}

.lead,
.meta {
  color: var(--doc-muted) !important;
}

body > h1:first-of-type {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

a {
  color: var(--doc-blue) !important;
  text-decoration-color: rgba(37, 99, 235, 0.28);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

.grid {
  gap: 1rem !important;
}

body > section {
  margin-top: 1.15rem !important;
}

body > section > ul {
  list-style: none !important;
  padding-left: 0 !important;
  display: grid;
  gap: 0.68rem;
}

body > section > ul > li {
  background: var(--doc-card);
  border: 1px solid var(--doc-line);
  border-radius: var(--doc-radius);
  box-shadow: var(--doc-shadow-soft);
  padding: 0.78rem 0.9rem;
}

.card,
.box,
.template,
.script,
.note,
table {
  background: var(--doc-card) !important;
  border-color: var(--doc-line) !important;
  box-shadow: var(--doc-shadow-soft);
  backdrop-filter: blur(12px);
}

.card,
.box,
.template,
.script,
.note {
  border-radius: var(--doc-radius) !important;
}

.card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(27, 95, 167, 0.24) !important;
  box-shadow: 0 16px 36px rgba(15, 47, 82, 0.12);
}

.ok {
  background: linear-gradient(180deg, rgba(235, 248, 243, 0.98), rgba(255, 255, 255, 0.94)) !important;
}

.warn {
  background: linear-gradient(180deg, rgba(255, 249, 224, 0.98), rgba(255, 255, 255, 0.94)) !important;
}

.info {
  background: linear-gradient(180deg, rgba(238, 245, 255, 0.96), rgba(255, 255, 255, 0.9)) !important;
}

.stop,
.danger {
  background: linear-gradient(180deg, rgba(255, 241, 240, 0.96), rgba(255, 255, 255, 0.9)) !important;
}

.safe,
.safe-note {
  background: #edf9f3 !important;
  border-color: rgba(84, 178, 126, 0.3) !important;
}

.private,
.note:not(.safe-note) {
  background: #fff8d9 !important;
  border-color: rgba(221, 174, 62, 0.34) !important;
}

table {
  border-radius: 18px !important;
  overflow: hidden;
}

th {
  background: linear-gradient(180deg, #edf5ff, #e4efff) !important;
  color: var(--doc-navy) !important;
}

td,
th {
  border-color: var(--doc-line) !important;
}

tr:nth-child(even) td {
  background: rgba(246, 249, 255, 0.62);
}

.tag {
  border-color: rgba(27, 95, 167, 0.16) !important;
  background: #eef6ff !important;
  color: var(--doc-navy) !important;
  box-shadow: none;
}

.no-print {
  border-color: rgba(15, 47, 82, 0.14) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: var(--doc-shadow-soft);
}

.actions,
.print-toolbar,
.top-bar {
  gap: 0.7rem !important;
}

button,
.button,
.no-print a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.62rem 1.15rem !important;
  color: var(--doc-navy) !important;
  background: #fff !important;
  border: 1px solid rgba(15, 47, 82, 0.78) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgba(15, 47, 82, 0.07);
  font-weight: 700 !important;
  text-decoration: none !important;
}

button,
.button-primary,
.print-toolbar button {
  color: #fff !important;
  background: linear-gradient(180deg, #123a66, #082944) !important;
  border-color: #082944 !important;
}

@media (max-width: 760px) {
  main {
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
  }

  .hero {
    border-radius: 22px !important;
  }

  table {
    font-size: 0.86rem !important;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  .hero::after {
    display: none !important;
  }

  main {
    padding: 10mm 12mm !important;
  }

  .hero,
  .card,
  .box,
  .template,
  .script,
  .note,
  table {
    box-shadow: none !important;
    backdrop-filter: none !important;
    background: #fff !important;
  }

  .card:hover {
    transform: none;
  }

  a {
    color: #000 !important;
  }
}
