:root {
  --gc-ink: #171512;
  --gc-muted: #6f6961;
  --gc-line: #dedbd5;
  --gc-paper: #ffffff;
  --gc-soft: #f7f5f1;
  --gc-accent: #c8522a;
  --gc-green: #18794e;
  --gc-max: 1120px;
  --gc-pad: clamp(14px, 4vw, 24px);
  --gc-panel-pad: clamp(16px, 4vw, 24px);
  --gc-gap: clamp(14px, 3vw, 28px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--gc-ink);
  background: #faf9f7;
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

h1,
h2,
h3,
p,
li,
label,
span,
strong,
summary {
  overflow-wrap: anywhere;
}

.gc-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--gc-line);
  background: rgba(255, 255, 255, 0.96);
}

.gc-nav-inner,
.gc-shell,
.gc-footer-inner {
  width: min(var(--gc-max), calc(100% - (var(--gc-pad) * 2)));
  margin: auto;
}

.gc-nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.gc-logo {
  font-size: 1.25rem;
  font-weight: 850;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.gc-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  min-width: 0;
}

.gc-nav a {
  color: inherit;
  text-decoration: none;
}

.gc-nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
}

.gc-shell {
  padding: clamp(28px, 5vw, 42px) 0 72px;
}

.gc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--gc-muted);
  font-size: 0.78rem;
}

.gc-breadcrumb a {
  color: inherit;
}

.gc-hero {
  max-width: 780px;
}

.gc-eyebrow {
  color: var(--gc-accent);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.gc-hero h1 {
  margin: 10px 0 16px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1.02;
}

.gc-hero p {
  color: var(--gc-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.gc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(min(100%, 300px), 0.88fr);
  gap: var(--gc-gap);
  align-items: start;
  margin-top: 34px;
  min-width: 0;
}

.gc-layout > *,
.global-fields > * {
  min-width: 0;
}

.gc-panel,
.gc-content {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--gc-line);
  border-radius: 14px;
  background: var(--gc-paper);
  padding: var(--gc-panel-pad);
  overflow: hidden;
}

.global-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

.global-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.global-fields span {
  color: var(--gc-ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.global-fields input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--gc-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.global-fields input:focus {
  outline: 3px solid rgba(200, 82, 42, 0.18);
  border-color: var(--gc-accent);
}

.global-calc-form button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  background: var(--gc-ink);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.global-result {
  margin-top: 18px;
  padding: clamp(16px, 4vw, 22px);
  border-radius: 12px;
  background: var(--gc-soft);
  min-width: 0;
}

.global-result span {
  display: block;
  color: var(--gc-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-result strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(1.55rem, 8vw, 3rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.global-result p {
  margin: 0;
  color: var(--gc-muted);
  line-height: 1.55;
}

.gc-content h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.gc-content h2:not(:first-child) {
  margin-top: 28px;
}

.gc-content p,
.gc-content li {
  color: var(--gc-muted);
  line-height: 1.7;
}

.gc-formula {
  max-width: 100%;
  padding: 14px;
  border-left: 3px solid var(--gc-accent);
  background: var(--gc-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gc-faq details {
  border-top: 1px solid var(--gc-line);
  padding: 14px 0;
}

.gc-faq summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 750;
}

.gc-footer {
  border-top: 1px solid var(--gc-line);
  background: #ffffff;
}

.gc-footer-inner {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--gc-muted);
  font-size: 0.8rem;
}

.gc-footer a {
  color: inherit;
}

@media (max-width: 1024px) {
  .gc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .gc-nav-links {
    display: none;
  }

  .gc-nav-inner {
    min-height: 60px;
  }

  .gc-shell {
    padding-top: 26px;
  }

  .global-fields {
    grid-template-columns: 1fr;
  }

  .gc-footer-inner {
    display: block;
  }

  .gc-footer-inner p {
    margin: 0 0 14px;
  }
}

@media (max-width: 430px) {
  .gc-panel,
  .gc-content {
    border-radius: 12px;
  }

  .gc-hero h1 {
    font-size: 1.9rem;
  }
}

@media (max-width: 360px) {
  .gc-nav-inner,
  .gc-shell,
  .gc-footer-inner {
    width: min(100% - 20px, var(--gc-max));
  }

  .gc-panel,
  .gc-content {
    padding: 14px;
  }
}
