:root {
  --bg: #d7d9de;
  --paper: #f7f8fa;
  --ink: #2a241a;
  --accent: #ffb1ec;
  --accent-2: #fbc84f;
  --accent-3: #aed8df;
  --accent-4: #d1eeac;
  --border: #6b5b3f;
  --shadow: 0 10px 0 rgba(64, 51, 31, 0.22);
}

* { box-sizing: border-box; }

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  transition: background-color 220ms ease, color 220ms ease;
}

.panel {
  width: min(720px, 100%);
  background: var(--paper);
  border: 4px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

h1,
h2 {
  font-family: "Solway", Georgia, serif;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 color-mix(in oklab, var(--accent-2) 70%, #ffffff);
}

.menu-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}

.menu-toggle {
  width: 44px;
  height: 40px;
  border: 3px solid var(--border);
  background: color-mix(in oklab, var(--accent-3) 30%, #ffffff);
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
}

.menu-toggle[aria-expanded="true"] {
  background: color-mix(in oklab, var(--accent-2) 65%, #ffffff);
}

.quick-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: max-content;
  min-width: 220px;
  margin: 0;
  padding: 0.45rem;
  list-style: none;
  border: 3px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  z-index: 5;
}

.quick-menu li + li {
  margin-top: 0.35rem;
}

.quick-menu a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.quick-menu a:hover,
.quick-menu a:focus-visible {
  background: color-mix(in oklab, var(--accent-3) 45%, #ffffff);
  outline: none;
}

.bubble {
  border: 3px solid var(--border);
  background: color-mix(in oklab, var(--accent-4) 25%, var(--paper));
  border-radius: 18px;
  padding: 1rem 1.1rem;
  position: relative;
  margin-top: 1rem;
  font-size: 1.08rem;
  line-height: 1.45;
}

.brand-visual {
  margin: 0 0 1rem;
}

.brand-visual img {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 2px solid color-mix(in oklab, var(--border) 70%, #ffffff);
  box-shadow: 0 8px 18px rgba(38, 31, 20, 0.18);
}

.bubble::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -16px;
  border-width: 14px 10px 0;
  border-style: solid;
  border-color: var(--border) transparent transparent;
}

.bubble::before {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -12px;
  border-width: 12px 8px 0;
  border-style: solid;
  border-color: color-mix(in oklab, var(--accent-4) 25%, var(--paper)) transparent transparent;
  z-index: 1;
}

.brand-guide {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--accent-3) 24%, #ffffff);
}

.brand-guide h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.brand-guide p {
  margin: 0.25rem 0;
}

.note {
  font-family: "Aileron", "Nunito", sans-serif;
  font-size: 0.95rem;
}

.contacts {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 3px dashed var(--border);
  border-radius: 14px;
  font-weight: 700;
}

.contacts p {
  margin: 0.35rem 0;
}

.representative {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: color-mix(in oklab, var(--paper) 92%, #ffffff);
}

.representative h2 {
  margin: 0;
  font-size: 1.2rem;
}

.representative-note {
  margin: 0.5rem 0 0.75rem;
  font-weight: 700;
}

.canvas-resource {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 10px;
  min-height: 420px;
  overflow: hidden;
  background: color-mix(in oklab, var(--paper) 85%, #ffffff);
}

.canvas-resource iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  overflow: hidden;
}

a {
  color: inherit;
}


.panel-wide {
  width: min(980px, 100%);
}

.representative-link-wrap,
.back-link-wrap {
  margin: 1rem 0 0;
  font-weight: 700;
}

.representative-link {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: color-mix(in oklab, var(--paper) 88%, #ffffff);
  text-decoration: none;
}

.representative-link:hover {
  text-decoration: underline;
}

.book-page {
  width: min(1200px, 100%);
  margin-top: 4.5rem;
  display: flex;
  justify-content: center;
}

.book-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.quick-menu a[aria-current="page"] {
  background: color-mix(in oklab, var(--accent-2) 45%, #ffffff);
}

.tax-form-intro {
  margin-top: 0;
  font-weight: 700;
}

.tax-form {
  display: grid;
  gap: 1rem;
}

.tax-section {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: color-mix(in oklab, var(--paper) 93%, #ffffff);
}

.tax-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
}

.tax-grid {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.tax-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tax-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tax-field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.tax-field > span {
  font-weight: 700;
}

.tax-field em,
.tax-fieldset em {
  color: #cc2b2b;
  font-style: normal;
}

.tax-field input,
.tax-field select,
.tax-field textarea {
  width: 100%;
  border: 2px solid color-mix(in oklab, var(--border) 70%, #ffffff);
  border-radius: 8px;
  padding: 0.58rem 0.65rem;
  font: inherit;
  background: #fff;
}

.tax-fieldset {
  border: 1px solid color-mix(in oklab, var(--border) 42%, #ffffff);
  border-radius: 8px;
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.75rem;
}

.tax-fieldset legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.tax-options-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

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

.tax-options-inline label,
.tax-options-grid label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.tax-conditional {
  margin: 0.2rem 0 1rem;
  padding: 0.75rem;
  border: 2px dashed color-mix(in oklab, var(--border) 45%, #ffffff);
  border-radius: 10px;
  background: color-mix(in oklab, var(--accent-3) 14%, #ffffff);
}

.tax-upload-wrap input[type="file"] {
  border-style: dashed;
  background: color-mix(in oklab, var(--accent-3) 20%, #ffffff);
}

.tax-tooltip {
  font-size: 0.9rem;
  font-weight: 700;
}

.tax-section-highlight {
  background: color-mix(in oklab, var(--accent-4) 28%, #ffffff);
}

.tax-drive-button {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  background: color-mix(in oklab, var(--accent-2) 45%, #ffffff);
}

.tax-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.tax-form-actions button {
  border: 2px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  padding: 0.65rem 1rem;
  background: color-mix(in oklab, var(--accent) 40%, #ffffff);
  cursor: pointer;
}

.form-status {
  margin: 0;
  font-weight: 700;
}

.tax-error {
  color: #b00020;
}

@media (max-width: 760px) {
  .tax-grid-2,
  .tax-grid-3,
  .tax-options-grid {
    grid-template-columns: 1fr;
  }
}
