:root {
  --ink: #172033;
  --muted: #5a6577;
  --line: #d9e0ea;
  --paper: #ffffff;
  --soft: #f3f6f9;
  --brand: #0f5d7a;
  --brand-dark: #0a3c50;
  --accent: #c69a34;
  --shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--brand);
}

.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(10, 60, 80, 0.9), rgba(15, 93, 122, 0.58)),
    url("hero-law-with-odle.png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-content {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 600px;
  font-size: 1.13rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-profile {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-profile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 54% 38%;
}

.profile-caption {
  padding: 18px;
}

.profile-caption h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.profile-caption p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  color: var(--brand-dark);
  background: #fff;
}

.button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.button.primary-dark {
  color: #fff;
  background: var(--brand);
}

.toolbar {
  width: min(1160px, calc(100% - 32px));
  margin: -36px auto 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.quick-actions {
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions a {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.07);
}

.quick-actions a:hover {
  border-color: rgba(15, 93, 122, 0.35);
}

.quick-actions strong {
  color: var(--brand-dark);
}

.quick-actions span {
  color: var(--muted);
  font-size: 0.92rem;
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 104px;
  padding: 10px 12px;
  resize: vertical;
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1160px) / 2));
  padding-right: max(16px, calc((100% - 1160px) / 2));
  background: var(--soft);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.section h2,
.about-layout h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
}

.section-heading p:not(.eyebrow),
.about-layout p {
  color: var(--muted);
  margin: 0;
}

.start-section {
  padding-bottom: 38px;
}

.route-grid,
.responsible-grid,
.contribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.route-card,
.notice-card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.route-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.route-card h3,
.notice-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.route-card p,
.notice-card p {
  margin: 0;
  color: var(--muted);
}

.route-card a {
  width: fit-content;
  margin-top: 4px;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.route-number {
  width: 44px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(198, 154, 52, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
}

.responsible-section {
  padding-top: 74px;
}

.responsible-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contribution-section {
  padding-top: 74px;
}

.contribution-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.notice-card {
  border-top: 4px solid var(--accent);
}

.content-grid,
.tools-grid,
.glossary-grid,
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.content-card,
.glossary-card,
.path-card,
.tool-panel,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.content-card {
  padding: 20px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.glossary-card,
.path-card {
  padding: 20px;
}

.content-card:hover,
.content-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(15, 93, 122, 0.35);
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.09);
}

.content-card h3,
.glossary-card h3,
.path-card h3,
.tool-panel h3,
.notice h3 {
  margin: 0 0 8px;
}

.content-card p,
.glossary-card p,
.path-card p,
.tool-panel p,
.notice p {
  margin: 0;
  color: var(--muted);
}

.term-example {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.path-card .pill {
  display: inline-flex;
  margin-top: 14px;
}

.path-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.path-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
}

.path-steps span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9f2f6;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-button {
  display: inline-block;
  margin-top: 16px;
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.mini-button.is-active {
  border-color: rgba(15, 93, 122, 0.25);
  color: var(--brand-dark);
  background: #e9f2f6;
}

.download-link {
  text-decoration: none;
}

.danger-button {
  display: block;
  color: #9a2c2c;
}

.danger-mini {
  color: #9a2c2c;
}

.tool-panel,
.notice {
  padding: 22px;
}

.quiz-area {
  margin-top: 34px;
}

.quiz-area h3 {
  margin: 0 0 6px;
}

.muted-copy,
.quiz-result {
  color: var(--muted);
}

.quiz-question {
  margin-top: 16px;
}

.quiz-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quiz-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  cursor: pointer;
}

.quiz-option input {
  width: auto;
  min-height: auto;
  margin-top: 4px;
}

.ask-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.ask-layout h3 {
  margin: 0 0 14px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.faq-item h3 {
  margin: 0 0 8px;
}

.faq-item p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

.about-profile-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.about-profile-copy p + p {
  margin-top: 12px;
}

.profile-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.profile-points span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #e9f2f6;
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-actions {
  margin-top: 22px;
}

.profile-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 4.5;
  object-fit: cover;
  object-position: 54% 38%;
}

.profile-panel div {
  padding: 20px;
}

.profile-panel h3 {
  margin: 0 0 8px;
}

.profile-panel p:not(.eyebrow) {
  color: var(--muted);
}

.legal-notice,
.edit-notice {
  grid-column: span 1;
}

.admin-layout,
.account-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  align-items: start;
}

.account-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card,
.account-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.content-editor-card {
  grid-column: 1 / -1;
}

.admin-card h3,
.account-card h3 {
  margin: 0 0 14px;
}

.admin-guide {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
}

.admin-guide strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.admin-guide ol {
  margin: 0;
  padding-left: 20px;
}

.admin-guide li + li {
  margin-top: 4px;
}

.admin-fields,
.form-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-grid {
  grid-template-columns: 1fr 1fr;
}

.stacked-field {
  margin-bottom: 14px;
}

.form-button {
  width: 100%;
  margin-top: 12px;
  border: 0;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.inline-form-button {
  align-self: end;
  margin-top: 0;
}

.admin-status,
.form-status,
.missing-file {
  margin: 12px 0 0;
  color: var(--muted);
}

.account-dashboard {
  grid-column: 1 / -1;
  border-color: rgba(15, 93, 122, 0.28);
}

.account-dashboard p:not(.eyebrow) {
  color: var(--muted);
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.progress-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 160px));
  gap: 12px;
  margin-top: 18px;
}

.progress-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.progress-summary strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brand);
}

.progress-summary span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.dashboard-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dashboard-lists h4 {
  margin: 0 0 8px;
}

.dashboard-lists ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-lists li {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-lists li span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.content-admin-list {
  margin-top: 24px;
}

.content-admin-list h4 {
  margin: 0 0 12px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.admin-list-item + .admin-list-item {
  margin-top: 10px;
}

.admin-list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.secondary-dark {
  color: var(--brand);
  border: 1px solid var(--line);
  background: #fff;
}

.outline-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.drop-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px;
  border: 2px dashed #a9bac9;
  border-radius: 8px;
  color: var(--brand-dark);
  background: #f8fbfd;
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone span {
  font-weight: 800;
}

.drop-zone small {
  color: var(--muted);
}

.drop-zone.is-dragging {
  border-color: var(--brand);
  background: #e9f2f6;
}

.drop-target,
[data-drop-heading] {
  transition: outline-color 160ms ease, background-color 160ms ease;
}

.is-drop-target {
  outline: 3px solid rgba(198, 154, 52, 0.75);
  outline-offset: 6px;
  background-color: rgba(198, 154, 52, 0.08);
}

.detail-dialog {
  width: min(760px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(23, 32, 51, 0.56);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.dialog-summary {
  color: var(--muted);
  font-size: 1.04rem;
}

.detail-body {
  color: var(--ink);
}

.detail-body ul {
  padding-left: 20px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.empty-state a {
  color: var(--brand);
  font-weight: 800;
}

.footer {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
    padding: 56px 0 74px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-profile {
    max-width: 420px;
  }

  .toolbar,
  .quick-actions,
  .route-grid,
  .responsible-grid,
  .contribution-grid,
  .content-grid,
  .glossary-grid,
  .path-grid,
  .tools-grid,
  .about-layout,
  .admin-layout,
  .admin-fields,
  .account-layout,
  .ask-layout,
  .form-grid,
  .dashboard-lists,
  .progress-summary {
    grid-template-columns: 1fr;
  }
}
