:root {
  color-scheme: light;
  --bg: #f4efe7;
  --paper: #fffdf8;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #dbcdbd;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --shadow: 0 20px 40px rgba(58, 34, 10, 0.08);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  color: var(--ink);
}

code {
  background: rgba(15, 118, 110, 0.08);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

.page-shell,
.landing-shell {
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.landing-card,
.hero-panel,
.panel {
  background: color-mix(in srgb, var(--paper) 90%, white 10%);
  border: 1px solid rgba(219, 205, 189, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.landing-card,
.hero-panel,
.panel {
  padding: 1.5rem;
}

.hero-panel {
  margin-bottom: 1.5rem;
}

.landing-card {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.4rem;
}

p {
  line-height: 1.5;
}

.support-copy,
.message-line,
.panel-header p,
.plain-list,
th,
td,
input,
button,
textarea,
select {
  font-size: 0.95rem;
}

.landing-actions,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar {
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stack-form {
  display: grid;
  gap: 0.9rem;
}

.compact-form {
  margin: 1rem 0 1.25rem;
}

.form-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
}

.form-mode-row strong {
  color: var(--accent-strong);
}

.form-mode-row .secondary-button {
  padding: 0.55rem 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

button,
.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: white;
}

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

.secondary-button {
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
}

.danger-button {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.data-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(219, 205, 189, 0.8);
}

th {
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
}

tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.table-actions button {
  padding: 0.55rem 0.8rem;
  white-space: nowrap;
}

.hidden {
  display: none;
}

.message-line {
  min-height: 1.4rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.plain-list {
  padding-left: 1rem;
}

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

  .page-shell,
  .landing-shell {
    width: min(100vw - 1rem, 100%);
  }

  .toolbar,
  .landing-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
