/* Foundation: typography, colors and page defaults */
:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #1d302b;
  background: #f4f5ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 0;
}
/* Page shell: header, branding and primary layout */
header {
  height: 86px;
  border-bottom: 1px solid #d5dcd3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
.brand {
  display: inline-flex;
  align-items: center;
  font-size: 32px;
  font-weight: 850;
  color: inherit;
  text-decoration: none;
  letter-spacing: -2px;
}
.brand span {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
  margin-left: 15px;
}
.badge {
  font-size: 10px;
  letter-spacing: 1.5px;
  border: 1px solid #b8c8bd;
  border-radius: 25px;
  padding: 9px 14px;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 48px 30px;
}
.eyebrow,
.section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #405b50;
}
.intro h1 {
  font-size: clamp(32px, 4.5vw, 57px);
  line-height: 1.08;
  font-weight: 550;
  letter-spacing: -2px;
  margin: 18px 0;
}
.intro h1 span {
  color: #43876a;
}
.intro p,
.muted {
  color: #4d6055;
  font-size: 14px;
  line-height: 1.7;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 36px;
  margin-top: 36px;
}
/* Calculator controls and input states */
form,
aside {
  background: white;
  border: 1px solid #dde3da;
  border-radius: 15px;
  padding: 24px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
}
label {
  display: block;
  font-size: 13px;
  margin: 12px 0;
}
textarea,
input {
  width: 100%;
  background: #f6f8f3;
  border: 1px solid #dde4d8;
  border-radius: 8px;
  padding: 16px;
  color: inherit;
  font: inherit;
  resize: vertical;
}
textarea:focus,
input:focus,
select:focus {
  outline: 2px solid #59896b;
  outline-offset: 2px;
}
#query {
  font-size: 19px;
}
.controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
button,
select {
  font: inherit;
  font-size: 12px;
  border-radius: 7px;
  padding: 11px 14px;
  cursor: pointer;
}
button {
  background: #214f3d;
  color: white;
  border: 0;
}
button:hover {
  background: #367157;
}
button:disabled {
  opacity: 0.5;
}
select {
  border: 1px solid #dbe1d7;
  background: #fff;
  color: #48604f;
}
/* Result presentation and chart/table output */
.result {
  margin-top: 18px;
  background: #e0eadc;
  border: 1px solid #cdddc8;
  border-radius: 15px;
  padding: 28px;
  overflow-wrap: anywhere;
}
.result h2 {
  font-size: 31px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 18px 0;
}
.result p {
  font-size: 13px;
  line-height: 1.7;
  color: #4f6958;
}
.value {
  font-size: 40px;
  font-weight: 550;
  margin: 16px 0;
  letter-spacing: -1px;
}
/* Examples, expandable panels and history */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.chips button,
.secondary {
  background: transparent;
  color: #3b604b;
  border: 1px solid #ccd6c7;
}
.chips button:hover {
  background: #e4eadf;
}
details {
  border-top: 1px solid #d6dfd1;
  padding: 17px 0;
  font-size: 13px;
  line-height: 1.7;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
#examples {
  display: grid;
  gap: 6px;
  margin-top: 15px;
}
#examples button {
  text-align: left;
  background: #e7ede2;
  color: #315740;
}
aside {
  align-self: start;
  min-height: 365px;
}
.text-button {
  background: none;
  color: #36533f;
  padding: 0;
}
#history {
  margin: 22px 0;
}
.history-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #f4f6f0;
  color: #244331;
  margin: 8px 0;
  padding: 13px;
  overflow-wrap: anywhere;
}
.history-item small {
  display: block;
  color: #405644;
  margin-bottom: 8px;
}
.history-item:hover {
  background: #e2ebda;
}
footer {
  margin-top: 55px;
  border-top: 1px solid #d7ded2;
  padding-top: 22px;
  font-size: 11px;
  color: #455b49;
}
.error {
  background: #f9e5dc;
  color: #853e24;
}
svg {
  width: 100%;
  max-height: 240px;
}
.table-wrap {
  overflow: auto;
  max-height: 250px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
td,
th {
  padding: 7px;
  border-bottom: 1px solid #bbcfb4;
  text-align: right;
}
code {
  background: #e2e9dc;
  padding: 2px 4px;
}
/* Responsive layout for narrow browser and Office task panes */
@media (max-width: 720px) {
  header {
    height: 65px;
    padding: 0 20px;
  }
  .badge {
    display: none;
  }
  main {
    padding: 28px 18px;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .intro h1 {
    font-size: 38px;
  }
  form,
  aside {
    padding: 18px;
  }
  .section-title {
    letter-spacing: 1px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .value {
    font-size: 32px;
  }
}

@media (min-width: 721px) {
  body {
    min-width: 0;
  }
}

/* Supplied brand artwork, scaled without distortion. */
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .brand-logo {
    width: 44px;
    height: 44px;
  }
}

/* Keyboard, contrast and narrow-screen accessibility. */
:focus-visible {
  outline: 3px solid #153f2e;
  outline-offset: 4px;
}
a {
  color: #214f3d;
  text-underline-offset: 3px;
}
button,
select,
summary {
  min-height: 44px;
}
.text-button {
  padding: 8px;
}
.text-button:hover,
.secondary:hover {
  background: #dde8d6;
  color: #214f3d;
}
textarea,
input,
select {
  border-color: #72846d;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  padding: 12px;
  background: white;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.privacy-panel {
  margin-top: 32px;
  padding: 24px;
  background: white;
  border: 1px solid #b2c3aa;
  border-radius: 12px;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.6;
}
.check-label input {
  width: 20px;
  height: 20px;
  padding: 0;
  flex-shrink: 0;
  margin-top: 3px;
}
[hidden] {
  display: none !important;
}
#query-help,
footer,
.legal p,
.legal li {
  font-size: 14px;
  line-height: 1.7;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.legal {
  max-width: 900px;
}
.legal h1 {
  font-size: 36px;
}
.legal h2 {
  margin-top: 32px;
}
.section-title {
  flex-wrap: wrap;
  gap: 12px;
}
.controls {
  flex-wrap: wrap;
}
.table-wrap:focus-visible {
  outline-offset: 2px;
}
@media (max-width: 400px) {
  .brand span {
    letter-spacing: 1px;
    margin-left: 8px;
  }
  .privacy-panel {
    padding: 16px;
  }
}

/* Local vector icons avoid font/encoding-dependent navigation symbols. */
footer nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
}
footer nav .nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Welcoming calculator workspace: local artwork, responsive cards and restrained motion. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
.calculator-page {
  background: #f7f8f2;
}
.calculator-page header {
  max-width: 1440px;
  margin: auto;
  border-bottom: 1px solid #dce3d5;
  height: 88px;
}
.top-nav {
  display: flex;
  gap: 28px;
}
.top-nav a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 0;
}
.top-nav a:hover {
  text-decoration: underline;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #347b53;
  margin-right: 6px;
}
.calculator-page main {
  max-width: 1280px;
  padding: 48px 40px;
}
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 22px 0 52px;
}
.hero h1 {
  font-size: clamp(44px, 5vw, 68px);
  letter-spacing: -3px;
  line-height: 1.07;
  margin: 20px 0;
  font-weight: 600;
}
.hero h1 span {
  color: #416d48;
}
.hero p {
  font-size: 16px;
  line-height: 1.8;
  color: #52624f;
}
.hero-cta {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  background: #213f2e;
  color: #fff;
  padding: 16px 22px;
  border-radius: 10px;
  text-decoration: none;
  margin-top: 12px;
  font-weight: 600;
  font-size: 14px;
}
.hero-cta:hover {
  background: #345e41;
}
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  font-size: 11px;
  color: #4f624f;
}
.hero-notes span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #30603d;
  margin-right: 6px;
}
.hero-art {
  height: 340px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #e6eddc;
}
.art-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#9aad8b25 1px, transparent 1px),
    linear-gradient(90deg, #9aad8b25 1px, transparent 1px);
  background-size: 32px 32px;
}
.orbit {
  position: absolute;
  border: 1px solid #a9bd9680;
  border-radius: 50%;
  width: 310px;
  height: 310px;
  left: 70px;
  top: 8px;
}
.orbit-two {
  width: 420px;
  height: 420px;
  left: 15px;
  top: -47px;
}
.math-tile {
  position: absolute;
  border-radius: 20px;
  box-shadow: 0 18px 38px #253e2b13;
}
.tile-main {
  top: 60px;
  left: 20%;
  width: 240px;
  background: #fffdf6;
  padding: 24px;
  transform: rotate(-6deg);
}
.tile-main > span {
  font-size: 11px;
  color: #5e7258;
}
.tile-main strong {
  display: block;
  font-size: 37px;
  letter-spacing: -1px;
  margin: 14px 0;
  font-weight: 500;
}
.tile-main > div {
  border-top: 1px solid #e2e8dc;
  padding-top: 12px;
  font-size: 45px;
  color: #34583c;
}
.tile-main small {
  font-size: 13px;
}
.tile-small {
  top: 24px;
  right: 20px;
  background: #d6e889;
  padding: 16px 25px;
  transform: rotate(12deg);
  font-size: 40px;
  color: #38522a;
}
.tile-chart {
  bottom: 26px;
  right: 20px;
  background: #254c36;
  display: flex;
  align-items: end;
  gap: 9px;
  height: 110px;
  padding: 19px;
  transform: rotate(8deg);
}
.tile-chart i {
  width: 17px;
  background: #d8e99c;
  border-radius: 5px 5px 0 0;
  height: 30px;
}
.tile-chart i:nth-child(2) {
  height: 46px;
}
.tile-chart i:nth-child(3) {
  height: 37px;
}
.tile-chart i:nth-child(4) {
  height: 60px;
}
.tile-chart i:nth-child(5) {
  height: 72px;
}
.art-caption {
  position: absolute;
  bottom: 18px;
  left: 18px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #4d6644;
  max-width: 160px;
  line-height: 1.5;
}
h2 {
  letter-spacing: -0.7px;
}
.discover h2,
.workspace-heading h2 {
  font-size: 25px;
  margin: 10px 0 0;
  font-weight: 600;
}
.discover {
  padding: 26px 0 38px;
  border-top: 1px solid #dce3d5;
}
.discover-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}
.category-filters {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: #e9eee2;
  border-radius: 12px;
  flex-wrap: wrap;
}
.category-filters button {
  background: transparent;
  color: #41573b;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 8px;
}
.category-filters button[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 2px 6px #18342110;
  color: #183e29;
}
.discovery-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.discovery-card {
  text-align: left;
  padding: 22px;
  background: #fff;
  color: #253d2c;
  border: 1px solid #dbe3d4;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.discovery-card:hover {
  background: #f0f5e7;
  transform: translateY(-3px);
  border-color: #799767;
  box-shadow: 0 8px 20px #2743290b;
}
.card-title {
  font-size: 16px;
  font-weight: 650;
}
.card-description {
  font-size: 12px;
  color: #54674c;
  line-height: 1.6;
}
.discovery-card code {
  margin-top: 8px;
  align-self: start;
  background: #edf2e5;
  font-size: 12px;
  border-radius: 5px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-top: 5px;
}
.workspace-hint {
  color: #55664d;
  font-size: 12px;
}
.calculator-page .layout {
  margin-top: 22px;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}
.calculator-page form,
.calculator-page aside {
  box-shadow: 0 4px 24px #203d2805;
  border-radius: 18px;
}
.panel-title {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: #29432c;
  font-weight: 650;
}
.calculator-page form .section-title {
  margin-bottom: 20px;
}
.calculator-page #query {
  font-size: 22px;
  background: #f8faf5;
  border-color: #879a7b;
  padding: 20px;
  border-radius: 12px;
  line-height: 1.5;
}
.input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #576c4f;
  font-size: 11px;
}
.input-meta button {
  font-size: 11px;
}
.calculator-page #query-help {
  font-size: 11px;
  line-height: 1.7;
  color: #51664c;
  margin: 0 0 18px;
}
.calculator-page #submit {
  font-size: 14px;
  padding: 14px 25px;
  min-width: 170px;
  border-radius: 10px;
}
.calculator-page #submit:disabled {
  opacity: 0.8;
  background: #52684d;
}
.calculator-page .result {
  background: #e8f0dd;
  border-color: #cbdcbc;
  padding: 25px;
  border-radius: 18px;
  position: relative;
}
.calculator-page .result h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
}
.empty-result-symbol {
  float: right;
  font-size: 56px;
  color: #526c3e;
  line-height: 1;
}
.calculator-page .result .value {
  font-size: 44px;
}
.calculator-page .result[aria-busy="true"] {
  opacity: 0.65;
}
.calculator-page .error {
  background: #fff0e9;
  border-color: #be8e73;
}
.count-pill {
  display: inline-block;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e6eddc;
  margin-left: 4px;
}
.calculator-page aside .section-title {
  gap: 8px;
}
.calculator-page aside #clear {
  font-size: 10px;
}
.calculator-page aside .muted {
  font-size: 12px;
}
.calculator-page .history-item {
  border-radius: 10px;
  border: 1px solid #e1e8d9;
  padding: 15px;
}
.calculator-page .history-item small {
  font-size: 12px;
}
.calculator-page .history-item strong {
  font-size: 20px;
  font-weight: 550;
}
.calculator-page #history {
  max-height: 480px;
  overflow: auto;
}
.calculator-page #export {
  width: 100%;
}
.calculator-page .privacy-panel {
  background: #eef3e7;
  border-color: #d4dfc8;
}
.calculator-page footer {
  margin-top: 35px;
}
.calculator-page footer nav a {
  font-size: 12px;
}
@media (min-width: 1000px) {
  .calculator-page aside {
    position: sticky;
    top: 20px;
  }
}
@media (max-width: 900px) {
  .badge {
    display: none;
  }
  .hero-art {
    height: 300px;
  }
  .tile-main {
    left: 12%;
    width: 200px;
  }
  .tile-chart {
    right: 12px;
  }
  .hero h1 {
    font-size: 50px;
  }
  .discover-heading {
    align-items: start;
    flex-direction: column;
  }
  .calculator-page main {
    padding: 30px 24px;
  }
}
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 12px 0 32px;
    gap: 26px;
  }
  .hero h1 {
    font-size: 48px;
    letter-spacing: -2px;
  }
  .hero-art {
    height: 240px;
  }
  .tile-main {
    left: 25%;
    top: 25px;
    width: 210px;
    padding: 18px;
  }
  .tile-main strong {
    font-size: 30px;
    margin: 10px 0;
  }
  .tile-main > div {
    font-size: 35px;
  }
  .tile-small {
    right: 12%;
    top: 16px;
    font-size: 32px;
    padding: 12px 20px;
  }
  .tile-chart {
    right: 13%;
    height: 90px;
    bottom: 16px;
  }
  .art-caption {
    max-width: 90px;
  }
  .discovery-cards {
    grid-template-columns: 1fr;
  }
  .discovery-card {
    padding: 18px;
  }
  .top-nav {
    gap: 16px;
  }
  .top-nav a {
    font-size: 12px;
  }
  .brand span {
    display: none;
  }
  .workspace-hint {
    display: none;
  }
  .calculator-page .layout {
    grid-template-columns: 1fr;
  }
  .calculator-page main {
    padding: 25px 18px;
  }
  .calculator-page .result .value {
    font-size: 34px;
  }
  .calculator-page header {
    height: 72px;
  }
  .hero-notes {
    font-size: 10px;
    gap: 10px;
  }
  .hero p br {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .discovery-card:hover {
    transform: none;
  }
}

.shortcut-hint {
  font-size: 10px;
  color: #52664b;
}
@media (max-width: 450px) {
  .shortcut-hint {
    display: none;
  }
}

.student-guide{max-width:960px;margin:auto;padding:24px;color:#203c2b;background:#f8fbf3}.student-guide section{margin:28px 0}.student-guide article{border:1px solid #879b78;border-radius:12px;padding:16px;margin:12px 0}.student-guide code{overflow-wrap:anywhere}.student-guide p{line-height:1.65}
