:root {
  --bg: #f5f5f6;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --accent: #0071ba;
  --accent-2: #005a93;
  --card: #ffffff;
  --stroke: #e3e3e6;
  --shadow: 0 20px 50px rgba(20, 20, 20, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1000px 700px at 15% 10%, #fff0f3 0%, transparent 60%),
              radial-gradient(1100px 800px at 85% 20%, #eef1f7 0%, transparent 55%),
              var(--bg);
  padding: clamp(24px, 4vw, 56px) 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1040px, 94vw);
  margin: 0 auto;
  display: grid;
  gap: 24px;
  animation: fadeUp 0.6s ease both;
}

.brand {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent-2);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
}

.title {
  font-family: "Roboto Slab", "Roboto", serif;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px 0;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.check-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  column-gap: 8px;
}

.check-row input[type="checkbox"] {
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
  justify-self: start;
}

input, select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(0, 113, 186, 0.35);
  outline-offset: 3px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 113, 186, 0.25);
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.toolbar-spaced {
  margin-top: 18px;
}

.inline-form {
  display: inline-block;
}

.compact-form {
  max-width: 320px;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.link-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.link-cell a {
  max-width: 420px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-hero {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.cover {
  width: 120px;
  height: 160px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #f3f6fb;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.cover.large {
  width: min(160px, 55vw);
  height: auto;
}

.cover img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.cover.placeholder {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e3f1fb;
  color: #005a93;
  font-size: 12px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 8px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6e6dc;
  color: #8a3b1b;
  border: 1px solid #f0d2c2;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.small {
  font-size: 13px;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
