:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --surface-3: #f8fafb;
  --ink: #14181d;
  --muted: #61707d;
  --line: #d8e0e6;
  --accent: #1d6f8f;
  --accent-strong: #15546c;
  --accent-soft: #dff0f4;
  --yellow: #f5b841;
  --green: #2d7d61;
  --rose: #ab4967;
  --shadow: 0 18px 46px rgba(29, 41, 50, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 245, 247, 0.96)),
    repeating-linear-gradient(90deg, rgba(29, 111, 143, 0.05) 0 1px, transparent 1px 46px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.brand,
.nav-item,
.panel-head,
.section-head,
.font-card,
.style-card-header,
.usage-panel {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  transform: rotate(-8deg);
}

.brand strong,
.brand span,
.panel-label {
  display: block;
}

.brand span,
.usage-panel p,
.hero p,
.info-panel p,
.faq-list p,
.footer,
.style-meta,
.studio-preview span {
  color: var(--muted);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.language-panel {
  display: grid;
  gap: 8px;
}

.language-panel label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.nav-item {
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item.active,
.nav-item:hover,
.nav-item:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 24px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
}

.usage-panel {
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel-label {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.usage-panel p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.main {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.tool-panel,
.panel,
.info-panel,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-copy {
  min-height: 330px;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(223, 240, 244, 0.72)),
    radial-gradient(circle at top right, rgba(245, 184, 65, 0.28), transparent 34%);
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: 3.8rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 670px;
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chip,
.tab,
.primary,
.secondary,
.copy-button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
}

.chip,
.tab {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.chip.active,
.chip:hover,
.tab.active,
.tab:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tool-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
}

.tool-panel label,
.controls-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

input {
  font-size: 1.04rem;
  font-weight: 800;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(29, 111, 143, 0.2);
  outline-offset: 2px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary,
.secondary,
.copy-button {
  padding: 0 14px;
}

.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary,
.copy-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary:hover,
.copy-button:hover {
  background: var(--surface-2);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(330px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.panel-head,
.section-head,
.style-card-header {
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.tabs,
.code-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.font-results {
  display: grid;
  gap: 10px;
}

.style-card {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
}

.style-name {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.style-preview {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1.12;
}

.style-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 800;
}

.tag {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f5;
}

.tag.safe {
  background: rgba(45, 125, 97, 0.13);
  color: var(--green);
}

.tag.display {
  background: rgba(171, 73, 103, 0.13);
  color: var(--rose);
}

.studio-preview {
  display: grid;
  gap: 6px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #172126, #23333b),
    var(--ink);
  color: #fff;
}

.studio-preview span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.studio-preview strong {
  font-size: 0.95rem;
}

.studio-preview p {
  margin: auto 0 0;
  overflow-wrap: anywhere;
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1.05;
}

.font-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.font-card {
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  text-align: left;
}

.font-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.font-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.font-card strong {
  display: block;
  margin-bottom: 3px;
}

.code-box {
  overflow: auto;
  min-height: 174px;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #14181d;
  color: #e8f3f6;
  font-size: 0.9rem;
  line-height: 1.5;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
  margin-top: 22px;
}

.info-panel {
  padding: 22px;
}

.info-panel h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.info-panel p {
  line-height: 1.58;
}

.keyword-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  font-weight: 800;
}

.faq-section {
  margin-top: 22px;
}

.section-head {
  margin-bottom: 14px;
}

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

.faq-list details {
  padding: 16px 18px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 12px 0 0;
  line-height: 1.55;
}

.footer {
  padding: 28px 0 8px;
  font-size: 0.86rem;
}

.footer p {
  margin-bottom: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 850;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .usage-panel {
    margin-top: 0;
  }

  .hero,
  .workspace-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }

  .studio-preview p {
    font-size: 2.35rem;
  }
}

@media (max-width: 720px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .hero-copy {
    min-height: auto;
    padding: 24px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .style-preview {
    font-size: 1.35rem;
  }

  .studio-preview p {
    font-size: 1.9rem;
  }

  .input-row,
  .controls-grid,
  .font-picker {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .section-head {
    align-items: flex-start;
  }
}
