* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: #183229;
  background: #f4f6ef;
  line-height: 1.55;
  --forest: #153930;
  --ink: #183229;
  --border: #ccd9ce;
  --accent: #ddea9b;
  --paper: #fff;
}
body { margin: 0; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: .2em; }
.site-header, footer { background: #fff; }
.header-inner {
  max-width: 77rem;
  margin: auto;
  padding: .9rem clamp(1rem, 4vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem 1.2rem;
  flex-wrap: wrap;
}
header nav { display: flex; align-items: center; gap: clamp(.5rem, 2vw, 1.5rem); flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 650; }
nav a:hover { text-decoration: underline; }
.brand { display: inline-flex; gap: .7rem; align-items: center; text-decoration: none; font-weight: 900; letter-spacing: .08em; }
.brand b { font-weight: 600; }
.brand img { border-radius: .65rem; }
.skip { position: absolute; left: 1rem; top: -5rem; background: white; padding: .6rem; z-index: 3; }
.skip:focus { top: .5rem; }
main { max-width: 77rem; margin: auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.hero {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 32rem;
  margin-top: 1.3rem;
  padding: clamp(1.5rem, 6vw, 5.5rem);
  border-radius: 1.5rem;
  color: white;
  background: linear-gradient(110deg, #0d2c26 20%, #194539 68%, #28594a);
}
.hero-inner { z-index: 1; }
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 45%; overflow: hidden; opacity: .7; }
.hero-art span { width: 75%; aspect-ratio: 1; display: block; position: absolute; border: 1px solid #9fb779; border-radius: 50%; }
.hero-art span:nth-child(1) { right: -15%; bottom: -8%; background: linear-gradient(140deg,#52786144,transparent); }
.hero-art span:nth-child(2) { right: 10%; bottom: -27%; }
.hero-art span:nth-child(3) { right: -2%; bottom: 16%; }
.eyebrow { font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-size: .8rem; }
h1,h2,h3,p { margin: 0 0 .75rem; }
h1 { max-width: 13ch; font-size: clamp(2.55rem,7.7vw,6rem); line-height: .99; letter-spacing: -.065em; }
h2 { font-size: clamp(1.7rem,4vw,2.6rem); line-height: 1.12; letter-spacing: -.04em; }
h3 { font-size: 1.16rem; }
.intro { max-width: 37ch; margin: 1.1rem 0 1.6rem; color: #e4eee6; font-size: 1.13rem; }
.section { padding: 2rem 0; scroll-margin-top: 1rem; }
.section-title { margin-bottom: 1.1rem; }
.grid,.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: .85rem; }
.secondary-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr)); align-items: start; }
.surface, article, details,.notice,#quote:not(:empty) { background: var(--paper); border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; }
.surface, details,.notice,#quote:not(:empty) { margin-bottom: .85rem; }
article h3 { margin-bottom: .36rem; }
article ul { padding-left: 1.1rem; margin: .4rem 0 .8rem; }
.card-meta { color: #526a5e; }
label { display: grid; gap: .25rem; margin: .3rem 0 .8rem; font-weight: 650; }
input,select,textarea,button,.button { font: inherit; border-radius: .5rem; min-height: 2.75rem; }
input,select,textarea { padding: .5rem; border: 1px solid #849789; background: #fff; color: inherit; width: 100%; }
textarea { min-height: 7rem; }
button,.button {
  display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent;
  background: var(--forest); color: white; padding: .45rem .9rem; font-weight: 750; text-decoration: none; cursor: pointer;
}
button:hover,.button:hover { filter: brightness(.92); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { border-color: var(--border); color: var(--ink); background: white; }
.accent,.notice { background: var(--accent); color: #142a22; }
summary { cursor: pointer; font-weight: 700; }
details > p { margin-top: .7rem; }
.check { display: flex; align-items: center; gap: .55rem; }
input[type=checkbox] { width: 1.25rem; min-height: auto; height: 1.25rem; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #99560b; outline-offset: 3px; }
#quote dl { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: .25rem 0; }
#quote dd { margin: 0; text-align: right; }
#quote .total { border-top: 1px solid var(--border); padding-top: .5rem; font-weight: 800; }
.action-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.owner h1 { font-size: clamp(2.2rem,5vw,4rem); max-width: none; }
.owner section { padding: 1rem 0; }
.owner article { margin-bottom: .75rem; overflow-wrap: anywhere; }
.owner article details { margin-top: .7rem; }
.owner textarea.code { min-height: 16rem; font-family: ui-monospace, monospace; }
.metric { font-size: 1.55rem; font-weight: 800; }
footer { margin-top: 2rem; }
@media (max-width: 42rem) { .hero { min-height: 25rem; } .hero-art { inset: 0 0 0 25%; opacity: .35; } }
@media (max-width: 25rem) { .header-inner { align-items: start; } nav { width: 100%; } }

.margin-red,.margin-orange,.margin-green,.margin-excellent{font-weight:700}
.margin-red{color:#922323}.margin-orange{color:#994700}.margin-green{color:#20603a}.margin-excellent{color:#064832}
.ai-section { padding:clamp(.8rem,3vw,1.6rem); border:1px solid #d6e3db; border-radius:1.1rem; background:#f3f7f3; min-width:0; }
.ai-header { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem 1rem; flex-wrap:wrap; }
.ai-header p { color:#43564c; margin:0; }
#ai-views { margin:.6rem 0 1rem; }
#ai-views [aria-pressed="false"] { background:#fff; color:#153930; border-color:#9aafa1; }
#ai-content { display:grid; gap:.7rem; min-width:0; }
.ai-thread { display:flex; flex-direction:column; gap:.7rem; max-height:min(60vh,34rem); overflow:auto; padding:.4rem; }
.ai-message,.ai-card,.ai-site-form,.ai-site-preview:not(:empty) { background:#fff; border:1px solid #d6e3db; border-radius:.8rem; padding:.8rem; min-width:0; }
.ai-message { max-width:min(100%,42rem); align-self:flex-start; }
.ai-message.ai-owner { align-self:flex-end; background:#e2eee6; }
.ai-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.ai-compose textarea,.ai-site-form textarea { min-height:4.5rem; }
#ai-content form,#ai-content details { min-width:0; }
#ai-content .action-row { gap:.4rem; }
@media(max-width:520px) { .ai-message { width:100%; } .ai-compose button { width:100%; } }
