:root {
  --bg: #e9eef2;
  --bg-soft: #dfe8ee;
  --brand: #bcd9e3;
  --brand-strong: #6bb8d2;
  --surface: #ffffff;
  --ink: #16354b;
  --ink-soft: #466378;
  --line: #d8e2e8;
  --shadow: 0 18px 40px rgba(61, 89, 109, 0.12);
  --radius: 26px;
  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-width {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.top-strip {
  height: 30px;
  background: var(--brand);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  min-height: 82px;
}

.brand-block {
  display: flex;
  align-items: stretch;
}

.brand-mark {
  width: 164px;
  min-height: 82px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
}

.brand-mark img {
  max-width: 100%;
  max-height: 54px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 18px;
}

.brand-text span {
  font-size: 14px;
  color: var(--ink-soft);
}

.brand-text strong {
  font-size: 26px;
}

.header-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
  font-weight: 700;
}

.header-nav a {
  padding: 10px 0;
}

main {
  padding-bottom: 48px;
}

.hero-strip {
  background: linear-gradient(180deg, var(--brand) 0%, #cfe1e8 100%);
  padding: 38px 0 46px;
}

.hero-block {
  min-height: 220px;
  display: flex;
  align-items: end;
}

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

.hero-kicker,
.stat-label,
.theme-name,
.scenario-type,
.section-tag {
  display: inline-block;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
  color: #5d7890;
  font-weight: 700;
}

.hero-copy h2,
.section-head h3,
.toolbox-head h4,
.admin-head h2,
.editor-section h3 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
}

.hero-copy p,
.section-head p,
.theme-card p,
.scenario-card p,
.stat-card p,
.advanced-intro,
.editor-section label span,
.login-card p {
  color: var(--ink-soft);
}

.overview-section,
.content-section,
.admin-page {
  margin-top: -18px;
}

.theme-grid,
.scenario-grid,
.advanced-columns,
.library-grid,
.two-col,
.admin-layout {
  display: grid;
  gap: 20px;
}

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

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

.surface-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.theme-card,
.scenario-card,
.toolbox-section,
.admin-head,
.admin-nav,
.editor-section {
  padding: 26px;
}

.theme-card {
  border-radius: 8px 40px 8px 8px;
  border-left: 6px solid #7fc7db;
}

.scenario-card {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(61, 89, 109, 0.08);
}

.toolbox-section {
  border-radius: 10px;
}

.advanced-section {
  border-top: 8px solid #7fc7db;
  background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
  padding-top: 30px;
}

.section-head {
  margin: 34px 0 18px;
}

.section-head h3 {
  font-size: 40px;
  margin-bottom: 10px;
}

.theme-card h4,
.scenario-card h4,
.toolbox-head h4 {
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1.15;
}

.link-button,
.primary-button,
.ghost-button,
.mini-action {
  border: 0;
  cursor: pointer;
}

.link-button,
.ghost-button,
.primary-button,
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.link-button,
.ghost-button {
  background: #eef5f8;
  color: var(--ink);
}

.primary-button {
  background: #37afcf;
  color: #fff;
}

.toolbox-section {
  margin-top: 20px;
}

.toolbox-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.model-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.model-link {
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: #eef5f8;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.model-link-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e5ea;
}

.model-link-logo img {
  width: 18px;
  height: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row label,
.editor-section label,
.login-fields {
  display: grid;
  gap: 8px;
}

.helper-copy {
  margin: 18px 0 10px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px 16px;
  color: var(--ink);
}

textarea {
  min-height: 170px;
  resize: vertical;
}

.compact-area {
  min-height: 100px;
}

.prompt-box {
  min-height: 280px;
  line-height: 1.6;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.status-copy {
  color: #4d7085;
  font-weight: 700;
}

.advanced-section h5 {
  margin: 0 0 14px;
  font-size: 22px;
}

.advanced-flow,
.advanced-main,
.advanced-side,
.advanced-guidance-grid {
  display: grid;
  gap: 18px;
}

.advanced-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.advanced-tab,
.prompt-chip {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 0;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.advanced-tab {
  margin-right: 26px;
}

.advanced-tab.is-active,
.prompt-chip.is-active {
  color: var(--ink);
}

.advanced-tab.is-active::after,
.prompt-chip.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 3px;
  background: #37afcf;
}

.advanced-panel {
  padding: 8px 0 0;
}

.advanced-panel-section {
  display: grid;
  gap: 20px;
}

.advanced-custom-block {
  display: grid;
  gap: 12px;
}

.advanced-prompt-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.advanced-prompt-box {
  min-height: 260px;
  background: #fff;
}

.prompt-explanation {
  margin: -2px 0 0;
  color: var(--ink-soft);
  max-width: 820px;
  line-height: 1.6;
}

.advanced-guidance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.inline-label {
  display: inline-block;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #5d7890;
  font-weight: 700;
}

.ordered-list,
.check-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.65;
}

.advanced-tool-list,
.stack-list {
  display: grid;
  gap: 16px;
}

.advanced-tool,
.library-card,
.library-editor {
  border: 1px solid var(--line);
  border-radius: 6px 24px 6px 6px;
  background: #f7fafb;
  padding: 18px;
}

.advanced-tool p,
.library-card textarea {
  margin: 8px 0 0;
}

.advanced-tool a {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
}

.advanced-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.advanced-tool-row {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.advanced-tool-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.advanced-tool-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.advanced-tool-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.advanced-tool-logo img {
  width: 20px;
  height: 20px;
}

.advanced-tool-meta p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.advanced-tool-steps {
  padding-left: 8px;
}

.advanced-tool-links a:last-child {
  color: #2f6983;
}

.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.advanced-block {
  margin-top: 28px;
}

.advanced-block-wide {
  margin-top: 0;
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: 8px;
}

.library-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.library-card textarea {
  min-height: 220px;
  margin-top: 12px;
  border-radius: 6px;
  background: #fff;
}

.library-card-large {
  background: linear-gradient(180deg, #fcfeff 0%, #f2f8fb 100%);
  border-left: 6px solid #7fc7db;
}

.library-card-large strong {
  font-size: 20px;
}

.library-label,
.advanced-note {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

.advanced-note {
  margin: 0 0 10px;
}

.advanced-tool-strong {
  background: #fff;
  border-radius: 8px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 24px 0 22px;
  font-size: 14px;
  color: #5d7890;
}

.breadcrumb button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.admin-page {
  padding-top: 32px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.admin-head h2 {
  font-size: 36px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.logged-in-as {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.admin-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  margin-top: 22px;
}

.admin-nav {
  align-self: start;
  position: sticky;
  top: 26px;
}

.nav-block + .nav-block {
  margin-top: 26px;
}

.nav-head,
.section-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.nav-head h3,
.section-line h3 {
  margin: 0;
  font-size: 22px;
}

.nav-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
}

.nav-item.is-active {
  background: #eef5f8;
  border-color: #d6e6ec;
}

.admin-content {
  display: grid;
  gap: 20px;
}

.admin-explainer {
  margin-top: 22px;
}

.explainer-grid,
.variant-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-section h3 {
  font-size: 28px;
  margin-bottom: 18px;
}

.editor-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.editor-subsection h4 {
  margin: 0;
  font-size: 22px;
}

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

.mini-action {
  background: #eef5f8;
  color: var(--ink);
  padding: 9px 12px;
}

.login-shell {
  min-height: calc(100vh - 112px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  padding: 22px;
  text-align: center;
}

.login-logo {
  width: 200px;
  max-width: 100%;
  margin-bottom: 0;
}

.login-logo-wrap {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.login-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.login-actions {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.login-social-button {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

.login-social-button img {
  width: 25px;
  height: 25px;
}

.login-fields input {
  border-radius: 4px;
}

.login-primary-button,
.login-text-button {
  width: 100%;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.login-primary-button {
  border: 0;
  background: #233f91;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.login-text-button {
  border: 0;
  background: transparent;
  color: #233f91;
  font-size: 13px;
}

@media (max-width: 980px) {
.theme-grid,
.scenario-grid,
.library-grid,
  .form-row,
  .two-col,
  .advanced-flow,
  .advanced-guidance-grid,
  .admin-layout,
  .explainer-grid,
  .variant-grid {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
  }

  .header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .header-nav {
    padding: 14px 0 18px;
  }
}

@media (max-width: 640px) {
  .brand-block {
    flex-direction: column;
  }

  .brand-mark {
    width: 100%;
  }

  .toolbox-head,
  .admin-head {
    flex-direction: column;
    align-items: stretch;
  }

  .advanced-tool-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .advanced-tab {
    margin-right: 16px;
  }

  .section-head h3,
  .theme-card h4,
  .scenario-card h4,
  .toolbox-head h4 {
    font-size: 28px;
  }
}
