:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --bg: #f5f7f8;
  --card: #ffffff;
  --border: #e5e7eb;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding: 24px 16px 64px;
}

.card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.header {
  text-align: center;
  margin-bottom: 8px;
}
.logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 12px;
}
.header h1 {
  font-size: 26px;
  margin: 0 0 6px;
  color: var(--accent-dark);
}
.sub {
  color: var(--muted);
  margin: 0;
}

.section {
  margin-top: 28px;
}
.section h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.field {
  display: block;
  margin-bottom: 14px;
}
.field > span {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
}
.field input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.req {
  color: var(--danger);
}
.optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}

/* Talk checklist */
.talks {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.talk-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.talk-row:last-child {
  border-bottom: none;
}
.talk-row:hover {
  background: #f9fafb;
}
.talk-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: none;
}
.talk-info {
  flex: 1;
}
.talk-title {
  font-weight: 600;
}
.talk-meta {
  color: var(--muted);
  font-size: 13px;
}
.talk-mins {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.loading {
  padding: 16px;
  color: var(--muted);
}

/* Live total bar */
.total-bar {
  margin-top: 20px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
}
.total-main {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-dark);
}
.total-sub {
  color: var(--muted);
  font-size: 14px;
}

/* Attestation */
.attest {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  cursor: pointer;
}
.attest input {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
}
.attest + .attest {
  margin-top: 12px;
}

/* Buttons */
.actions {
  margin-top: 24px;
  text-align: center;
}
.btn {
  font-size: 16px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}
.btn.secondary {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 18px;
}
.hint.error {
  color: var(--danger);
}

/* Post-generation block */
.post {
  border-top: 1px dashed var(--border);
  padding-top: 24px;
}
.post-ok {
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
  font-size: 18px;
}
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  margin-top: 12px;
}
.email-block {
  flex: 1;
  min-width: 240px;
}
.email-block .field {
  margin-bottom: 10px;
}
.post-msg {
  text-align: center;
  margin-top: 14px;
  min-height: 18px;
  font-size: 14px;
}
.post-msg.error {
  color: var(--danger);
}
.post-msg.ok {
  color: var(--accent-dark);
  font-weight: 600;
}

.hidden {
  display: none;
}

.page-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 24px;
}
