:root {
  --text: #202124;
  --muted: #5f6368;
  --border: #dadce0;
  --background: #f8f9fa;
  --surface: #ffffff;
  --accent: #2f5d50;
  --accent-dark: #24483e;
  --error-bg: #fff8e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

.page {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.page-header,
.application-form,
.result-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.page-header {
  padding: 24px 26px;
  border-top: 7px solid var(--accent);
}

.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
}

.page-header p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
}

.application-form,
.result-panel {
  margin-top: 14px;
}

section {
  padding: 22px 26px;
  border-top: 1px solid var(--border);
}

section:first-child {
  border-top: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 600;
}

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

.field-grid > label,
.field-grid > fieldset {
  margin-top: 0;
}

label,
legend {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

section > label {
  margin-top: 18px;
}

.small-copy + label {
  margin-top: 14px;
}

input,
textarea {
  width: 100%;
  margin-top: 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--text);
  outline: none;
}

input {
  height: 42px;
  padding: 0 10px;
}

textarea {
  min-height: 128px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 93, 80, 0.12);
}

fieldset {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.field-grid fieldset {
  margin: 0;
}

.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 11px;
}

.choice-list.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.choice-list.year-options {
  align-items: center;
  gap: 12px 22px;
}

.choice-list.year-options label {
  min-height: 24px;
  white-space: nowrap;
}

.choice-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.choice-list input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: var(--accent);
}

.small-copy {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.notice {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #e1d7b8;
  border-radius: 6px;
  background: var(--error-bg);
}

.notice[hidden],
#seminar-proposal-fields[hidden],
.result-panel[hidden],
[hidden] {
  display: none;
}

.notice p {
  margin-bottom: 14px;
  color: #514833;
}

#seminar-proposal-fields {
  margin-top: 20px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 26px 26px;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

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

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

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.secondary-button:hover {
  border-color: var(--accent);
}

.result-panel {
  padding-top: 22px;
}

.result-panel > .kicker,
.result-panel > h2,
.result-panel > p {
  margin-left: 26px;
  margin-right: 26px;
}

.result-panel h2 {
  margin-bottom: 8px;
}

.result-panel p {
  color: var(--muted);
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 18px, 760px);
    padding-top: 12px;
  }

  .page-header,
  section {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .choice-list.year-options {
    display: grid;
    gap: 10px;
  }

  .choice-list.year-options label {
    white-space: normal;
  }

  .form-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
