@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #191919;
  background: #f7f5eb;
  font-synthesis: none;
  accent-color: #191919;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 90% 0%, #ffef8b 0, transparent 31%), #f7f5eb; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: #302600; }

.shell { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 0 28px; }
.brand { display: inline-flex; align-items: center; gap: 15px; color: #191919; text-decoration: none; font-family: Manrope, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.035em; line-height: 1.15; }
.mad-lockup { display: flex; align-items: center; justify-content: center; flex: none; width: 151px; height: 59px; padding: 8px 13px; border-radius: 13px; background: #f6d21e; }
.mad-lockup img { display: block; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(0); }
.product-name { max-width: 156px; }
.toplinks { display: flex; align-items: center; gap: 18px; font-size: 14px; color: #575347; }
.toplinks a { text-decoration: none; border-bottom: 2px solid transparent; }
.toplinks a:hover { border-color: #191919; }

.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 800; color: #705800; }
h1, h2, h3 { font-family: Manrope, sans-serif; letter-spacing: -.045em; line-height: 1.16; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 56px); max-width: 720px; }
h2 { font-size: 23px; margin-bottom: 10px; }
h3 { font-size: 17px; margin-bottom: 8px; }
p { line-height: 1.5; }

.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); gap: 28px; align-items: stretch; margin: 18px 0 28px; }
.hero-main { padding: 34px 38px; min-height: 240px; border-radius: 24px; background: radial-gradient(circle at 90% 11%, #373217, transparent 37%), #171717; color: #fffdf3; }
.hero-main .eyebrow { color: #ffdf48; }
.hero-main p { max-width: 590px; color: #eee9d8; }
.hero-side { padding: 28px; border: 1px solid #e3c635; background: #f7d637; border-radius: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-side .eyebrow { color: #433500; }
.hero-side strong { font: 800 26px Manrope, sans-serif; color: #191919; }
.hero-side .muted { color: #3e370f; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { border: 1px solid #e7e0ca; background: #fffefa; border-radius: 20px; padding: 24px; box-shadow: 0 10px 30px #2f24000d; }
.card.wide { grid-column: 1 / -1; }
.card p { color: #524e43; margin: 4px 0 17px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
label { font-weight: 700; font-size: 14px; color: #29271e; }
input[type=text], input[type=file], input[type=number], textarea, select { width: 100%; border: 1px solid #cfc9b8; background: #fffef9; border-radius: 11px; padding: 11px 13px; color: #191919; }
textarea { min-height: 100px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #e2b900; outline-offset: 2px; }

.button { border: 1px solid #151515; border-radius: 11px; background: #f6d21e; color: #151515; padding: 11px 17px; font-weight: 700; box-shadow: 0 6px 14px #4d3d001f; }
.button:hover:not(:disabled) { background: #ffdf42; }
.button.secondary { background: #fffefa; color: #191919; box-shadow: none; }
.button.secondary:hover:not(:disabled) { background: #fff4b3; }
.button.danger { border-color: #f2ceca; background: #fff0ee; color: #972b1b; box-shadow: none; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 99px; background: #fff1aa; color: #4d3c00; font-size: 12px; font-weight: 700; }
.muted { color: #625d50; font-size: 13px; }
.fineprint { font-size: 12px; color: #625d50; }
.notice { padding: 12px 14px; border-radius: 12px; background: #fff0a5; color: #342900; font-size: 14px; }
.notice.error { background: #fff0ec; color: #972b1b; }
.list { display: grid; gap: 9px; margin: 10px 0; padding: 0; list-style: none; }
.list li { padding: 12px 14px; background: #fbf9ef; border-radius: 11px; border: 1px solid #e8e1cb; }
.messages { display: grid; gap: 10px; max-height: 340px; overflow: auto; padding: 8px 0; }
.bubble { padding: 13px 15px; border-radius: 14px; max-width: 90%; white-space: pre-wrap; line-height: 1.5; background: #f2f0e6; }
.bubble.user { justify-self: end; background: #ffeb87; }
.bubble.assistant { justify-self: start; }
.avatar { display: block; max-width: min(100%, 380px); max-height: 430px; margin: 0 auto; border-radius: 16px; background: #171717; }
.viewer { width: 100%; height: 420px; border: 0; border-radius: 16px; background: #171717; }
.metric { display: flex; justify-content: space-between; border-bottom: 1px solid #e9e3d0; padding: 10px 0; }
.metric:last-child { border: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; }
.check input { width: 18px; height: 18px; accent-color: #191919; margin-top: 2px; }
.check label { font-weight: 500; }
.empty { padding: 24px; text-align: center; border: 1px dashed #cabf9c; border-radius: 13px; color: #625d50; }

@media (max-width: 760px) {
  .shell { padding: 16px 16px 46px; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .mad-lockup { width: 116px; height: 48px; padding: 7px 10px; }
  .brand { gap: 10px; font-size: 16px; }
  .product-name { max-width: 115px; }
  .toplinks { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
  .hero, .grid { grid-template-columns: 1fr; }
  .hero-main { padding: 27px; }
  .card.wide { grid-column: auto; }
  .card { padding: 20px; }
  .viewer { height: 560px; }
}
