:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f8fa;
  --text: #101418;
  --muted: #5f6b76;
  --line: #dce3e8;
  --blue: #165dff;
  --teal: #007f73;
  --teal-soft: #e6f5f2;
  --shadow: 0 18px 50px rgba(20, 35, 50, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding: 64px 0 36px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro > div > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.automation-status {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--line);
  padding: 8px 0 8px 24px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #12a86b;
  box-shadow: 0 0 0 6px rgba(18, 168, 107, 0.12);
}

.automation-status div {
  display: grid;
}

.automation-status small {
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 220px 220px;
  gap: 12px;
  border-block: 1px solid var(--line);
  padding: 18px 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(22, 93, 255, 0.12);
}

.featured {
  padding: 32px 0;
}

.featured-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  gap: 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 32px;
}

.entry-meta,
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.featured-entry h2 {
  max-width: 720px;
  margin: 14px 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.featured-entry p {
  max-width: 730px;
  color: var(--muted);
  font-size: 1.03rem;
}

.featured-notes {
  display: grid;
  align-content: start;
  gap: 14px;
  border-left: 3px solid var(--teal);
  background: var(--surface);
  padding: 20px;
}

.featured-notes div {
  display: grid;
  gap: 3px;
}

.featured-notes span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.open-entry {
  justify-self: start;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.88rem;
}

.use-case-list {
  border-top: 1px solid var(--line);
}

.use-case-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  gap: 24px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 22px 0;
  text-align: left;
  cursor: pointer;
}

.use-case-row:hover {
  background: linear-gradient(90deg, transparent, var(--surface), transparent);
}

.use-case-row h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.use-case-row p {
  margin: 0;
  color: var(--muted);
}

.row-side {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.row-side strong {
  color: var(--teal);
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 60px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding: 52px 0 72px;
}

.about p,
.about li {
  color: var(--muted);
}

.about ol {
  display: grid;
  gap: 12px;
  margin: 0;
}

.empty {
  color: var(--muted);
  padding: 32px 0;
}

dialog {
  width: min(880px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 28px;
}

dialog::backdrop {
  background: rgba(10, 18, 25, 0.64);
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.detail-header {
  max-width: 720px;
  padding: 20px 0 24px;
}

.detail-header h2 {
  margin: 10px 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding: 22px 0 10px;
}

.detail-section h3 {
  font-size: 1rem;
}

.detail-section ul,
.detail-section ol {
  display: grid;
  gap: 8px;
}

.sources {
  display: grid;
  gap: 9px;
}

.sources a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 0 40px;
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  nav {
    display: none;
  }

  .intro,
  .featured-entry,
  .about {
    grid-template-columns: 1fr;
  }

  .intro {
    align-items: start;
    padding-top: 42px;
  }

  .automation-status,
  .featured-notes {
    border-left-width: 0;
    border-top: 3px solid var(--teal);
    padding-left: 0;
    padding-top: 16px;
  }

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

  .use-case-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  footer {
    flex-direction: column;
  }
}
