:root {
  --alc-bg: #f7f4ee;
  --alc-surface: #ffffff;
  --alc-ink: #1f2933;
  --alc-muted: #687381;
  --alc-line: #e4ded4;
  --alc-accent: #b76246;
  --alc-accent-dark: #934b36;
  --alc-soft: #f1ebe2;
  --alc-warn: #9a5b00;
  --alc-warn-bg: #fff7df;
  --alc-warn-line: #f2d48a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--alc-bg);
  color: var(--alc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

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

.alc-tools-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.alc-tools-brand {
  color: var(--alc-ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.alc-tools-dropdown {
  position: relative;
}

.alc-tools-trigger {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: var(--alc-surface);
  color: var(--alc-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.alc-tools-trigger::after {
  content: "v";
  margin-left: 7px;
  color: var(--alc-muted);
  font-size: 10px;
}

.alc-tools-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: var(--alc-surface);
  box-shadow: 0 14px 35px rgba(31, 41, 51, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}

.alc-tools-dropdown:hover .alc-tools-list,
.alc-tools-dropdown:focus-within .alc-tools-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.alc-tools-list a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--alc-ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.alc-tools-list a:hover,
.alc-tools-list a:focus {
  background: var(--alc-soft);
  outline: none;
}

.alc-hero {
  margin-bottom: 20px;
}

.alc-eyebrow {
  margin: 0 0 8px;
  color: var(--alc-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alc-hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.alc-lead {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--alc-muted);
  font-size: 16px;
  line-height: 1.65;
}

.alc-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.alc-form,
.alc-result,
.alc-notes {
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: var(--alc-surface);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.07);
}

.alc-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.alc-field {
  display: grid;
  gap: 8px;
}

.alc-field label,
.alc-fieldset legend {
  color: #303944;
  font-size: 14px;
  font-weight: 800;
}

.alc-field input[type="date"] {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: #fffdf9;
  color: var(--alc-ink);
}

.alc-field input[type="date"]:focus {
  border-color: var(--alc-accent);
  outline: 3px solid rgba(183, 98, 70, 0.13);
}

.alc-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.alc-segment,
.alc-radio-list {
  display: grid;
  gap: 8px;
}

.alc-segment {
  grid-template-columns: repeat(2, 1fr);
  padding: 4px;
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: var(--alc-soft);
}

.alc-segment label,
.alc-radio-list label {
  cursor: pointer;
}

.alc-segment input,
.alc-radio-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.alc-segment span,
.alc-radio-list span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--alc-muted);
  font-size: 14px;
  font-weight: 800;
}

.alc-segment input:checked + span {
  background: var(--alc-surface);
  color: var(--alc-accent-dark);
  box-shadow: 0 5px 14px rgba(31, 41, 51, 0.08);
}

.alc-radio-list {
  grid-template-columns: repeat(2, 1fr);
}

.alc-radio-list span {
  border: 1px solid var(--alc-line);
  background: #fffdf9;
}

.alc-radio-list input:checked + span {
  border-color: var(--alc-accent);
  background: #fff5ef;
  color: var(--alc-accent-dark);
}

.alc-help {
  margin: 0;
  color: var(--alc-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.alc-actions,
.alc-copy-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.alc-primary,
.alc-secondary {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.alc-primary {
  flex: 1;
  border: 0;
  background: var(--alc-accent);
  color: #fff;
}

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

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

.alc-result {
  min-height: 430px;
  padding: 18px;
}

.alc-empty {
  min-height: 390px;
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--alc-muted);
  text-align: center;
  line-height: 1.55;
}

.alc-empty strong {
  color: var(--alc-ink);
  font-size: 18px;
}

.alc-warning {
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid var(--alc-warn-line);
  border-radius: 8px;
  background: var(--alc-warn-bg);
  color: var(--alc-warn);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
}

.alc-result-card {
  padding: 18px;
  border-radius: 8px;
  background: #2b2925;
  color: #fff;
}

.alc-result-label {
  display: block;
  margin-bottom: 8px;
  color: #dbc7b8;
  font-size: 12px;
  font-weight: 800;
}

.alc-result-card strong {
  display: block;
  font-size: clamp(42px, 14vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.alc-result-card p {
  margin: 12px 0 0;
  color: #f3e8df;
  font-size: 14px;
  line-height: 1.55;
}

.alc-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.alc-detail-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--alc-line);
  border-radius: 8px;
  background: #fffdf9;
}

.alc-detail-grid dt {
  color: var(--alc-muted);
  font-size: 12px;
  font-weight: 800;
}

.alc-detail-grid dd {
  margin: 6px 0 0;
  color: var(--alc-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.alc-copy-row {
  margin-top: 14px;
}

#copy-status {
  color: var(--alc-muted);
  font-size: 13px;
  font-weight: 700;
}

.alc-notes {
  margin-top: 16px;
  padding: 18px;
}

.alc-notes h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.alc-notes ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--alc-muted);
  font-size: 14px;
  line-height: 1.6;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .alc-page {
    padding: 22px 14px 36px;
  }

  .alc-workspace {
    grid-template-columns: 1fr;
  }

  .alc-form,
  .alc-result,
  .alc-notes {
    border-radius: 8px;
  }

  .alc-radio-list,
  .alc-detail-grid {
    grid-template-columns: 1fr;
  }

  .alc-actions {
    flex-direction: column;
  }

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