:root {
  --bg: #f6f2eb;
  --paper: #fffdf8;
  --text: #26201a;
  --muted: #766b60;
  --line: #e5d9ca;
  --primary: #6e3f1f;
  --primary-dark: #4f2d16;
  --danger: #a83b2f;
  --success: #2f6f4e;
  --shadow: 0 18px 45px rgba(67, 48, 31, 0.11);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fff8ed 0, var(--bg) 38%, #efe7db 100%);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid rgba(110, 63, 31, 0.12);
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.top-nav {
  display: flex;
  gap: 14px;
  font-size: 0.95rem;
}

main.container {
  padding: 36px 0 52px;
}

.site-footer {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 28px 0 42px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(110, 63, 31, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.hero {
  padding: clamp(28px, 6vw, 56px);
}

.narrow {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

p {
  margin: 0 0 14px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
}

.contact-line {
  margin: 24px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110, 63, 31, 0.22);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  background: #fffaf2;
  font-weight: 700;
  cursor: pointer;
  min-height: 42px;
  text-decoration: none;
  font-size: 0.95rem;
}

.button:hover {
  text-decoration: none;
  background: #fff3df;
}

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

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

.button.danger {
  color: white;
  background: var(--danger);
  border-color: var(--danger);
}

.button.small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 0.86rem;
}

.form {
  display: grid;
  gap: 16px;
}

.form.compact {
  gap: 12px;
}

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

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffefa;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(110, 63, 31, 0.18);
  border-color: rgba(110, 63, 31, 0.45);
}

.copy-field {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 8px 0 14px;
}

.notice {
  padding: 13px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  background: #eef8f1;
  border: 1px solid rgba(47, 111, 78, 0.22);
  color: var(--success);
  font-weight: 700;
}

.notice.error {
  background: #fff0ed;
  border-color: rgba(168, 59, 47, 0.24);
  color: var(--danger);
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

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

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

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card > h2 {
  padding: 24px 28px 0;
}

.table-wrap {
  overflow-x: auto;
}

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

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(246, 242, 235, 0.55);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eee4d6;
  color: #5c4c3e;
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge.good {
  background: #e3f2e8;
  color: var(--success);
}

.details {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 16px;
  margin: 0;
}

.details dt {
  color: var(--muted);
  font-weight: 800;
}

.details dd {
  margin: 0;
}

.inline {
  display: inline;
}

.nowrap {
  white-space: nowrap;
}

.questions ol {
  padding-left: 1.35rem;
  margin: 12px 0 0;
}

.questions li {
  padding: 6px 0;
}

.feedback-list {
  display: grid;
  gap: 14px;
}

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fffaf2;
}

.feedback-item time {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.danger-zone {
  border-color: rgba(168, 59, 47, 0.28);
}

.error-box {
  white-space: pre-wrap;
  background: #2b1c19;
  color: #ffe9e4;
  padding: 14px;
  border-radius: 12px;
  overflow-x: auto;
}

code {
  background: rgba(110, 63, 31, 0.08);
  padding: 2px 5px;
  border-radius: 6px;
}

small {
  font-size: 0.87rem;
}

@media (max-width: 760px) {
  .header-inner,
  .page-title,
  .site-footer .container {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card {
    padding: 22px;
  }

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

  .nowrap {
    white-space: normal;
  }
}
