:root {
  color-scheme: light;
  --ink: #1e302d;
  --muted: #50645d;
  --accent: #175f58;
  --line: #dbe5df;
  --paper: #fff;
  background: #f7f8f4;
  color: var(--ink);
  font: 15px/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea, input, select { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; max-width: 1180px; margin: auto; padding: 20px 26px;
}
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 760; }
.brand-sub { color: var(--muted); font-weight: 500; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; margin-right: 4px; border-radius: 9px; background: #dfeee7; color: var(--accent); font-weight: 850; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px;
  padding: 7px 14px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; font-weight: 660; cursor: pointer;
}
.secondary { background: var(--paper); border-color: var(--line); }
.secondary:hover, .pill:hover { background: #eaf2ec; }
.primary { background: var(--accent); color: var(--paper); }
.primary:hover { background: #104942; }
main { max-width: 1110px; margin: 0 auto; padding: 0 24px 64px; }
.hero {
  margin: 15px 0 33px; padding: clamp(26px,6vw,67px) 18px;
  background: radial-gradient(ellipse at 15% 12%,#e0f0e7,transparent 59%),radial-gradient(ellipse at 90% 82%,#f0e9d8,transparent 58%),#f0f4ed;
  border: 1px solid #e3eae1; border-radius: 25px; text-align: center;
}
h1 { font: 500 clamp(37px,5.8vw,63px)/1.05 Georgia, serif; letter-spacing: -.05em; }
h2 { font-size: 18px; font-weight: 720; }
.hero p, .gallery-title p { margin: 12px 0 0; color: var(--muted); }
.composer {
  max-width: 593px; margin: 24px auto 0; padding: 11px;
  border: 1px solid #cadbd1; border-radius: 19px; background: var(--paper);
  box-shadow: 0 9px 22px #19372b10; text-align: left;
}
.composer:focus-within { border-color: var(--accent); }
textarea { width: 100%; padding: 4px 5px; resize: vertical; border: 0; background: transparent; font-size: 16px; }
textarea:focus { outline: 0; }
textarea::placeholder { color: var(--muted); }
.composer-actions { display: flex; justify-content: flex-end; }

.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 11px; }
.tile {
  position: relative; display: grid; grid-template-columns: 76px 1fr 16px; align-items: center; gap: 11px; min-width: 0;
  min-height: 109px; padding: 12px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--paper); text-decoration: none; text-align: left; cursor: pointer;
}
.tile:hover { border-color: #86a99a; box-shadow: 0 4px 18px #25483710; }
.tile.featured { border-color: #94b5a6; }
.tile-text { display: grid; gap: 4px; }
.tile-description { color: var(--muted); font-size: 13px; }
.arrow { color: var(--accent); }
.art { min-height: 70px; display: grid; place-items: center; border-radius: 10px; background: #e3f1e7; color: #b4d1c1; }
.art.landing { background: #f1e8d8; color: #d6ba8e; }
.art.dashboard { background: #e6ecf8; color: #b5c4e3; }
.art.tasks { background: #f3e5ee; color: #d8b5cc; }
.art.fullstack { background: #eee9fa; color: #c8b8e9; }
.art.travel { background: #dfede9; color: #9dbfb4; }
.mini { display: flex; align-items: end; gap: 4px; width: 51px; height: 39px; padding: 15px 5px 5px; border: 1px solid currentColor; border-radius: 6px; background: #ffffffbf; position: relative; }
.mini::before { content: '···'; color: var(--muted); position: absolute; top: -5px; left: 6px; letter-spacing: 1px; }
.mini i { display: block; height: 15px; flex: 1; border-radius: 3px; background: currentColor; }
.dashboard i:nth-child(2) { height: 20px; }
.dashboard i:last-child { height: 10px; }
.landing i:first-child { flex: 3; }
.tasks .mini, .fullstack .mini { flex-direction: column; align-items: stretch; gap: 3px; }
.travel i { height: 19px; clip-path: polygon(0 100%,50% 0,100% 100%); }
.back { display: inline-block; margin: 23px 0 15px; color: var(--accent); text-underline-offset: 3px; }
.gallery-title { margin-bottom: 19px; }
.idea-context { display: inline-block; padding: 8px 11px; margin-bottom: 15px; background: #e8f0e9; border-radius: 9px; overflow-wrap: anywhere; }
#switcher { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 21px; }
.pill { padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 13px; }
.pill[aria-current=page] { background: #e0eee6; border-color: #a7c6b7; font-weight: 700; }
#templates { grid-template-columns: repeat(2,minmax(0,1fr)); }
#templates .tile { min-height: 126px; }
dialog { width: min(890px,calc(100% - 24px)); max-height: 94dvh; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; padding: 14px; }
dialog::backdrop { background: #182c27a6; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.dialog-heading p { color: var(--muted); }
.dialog-footer { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 10px; }
.preview-frame { display: block; width: 100%; height: min(61dvh,530px); border: 1px solid var(--line); border-radius: 10px; }
.demo { border: 1px solid var(--line); padding: 13px; border-radius: 12px; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.demo-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.demo-form label { display: grid; gap: 4px; }
.demo-form input,.demo-form select { min-width: 0; border: 1px solid var(--line); padding: 7px; border-radius: 8px; }
.demo-form button { align-self: end; }
.demo-status { color: var(--accent); }
@media(max-width: 860px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 540px) {
  .top,main { padding-inline: 13px; }
  .top { padding-block: 12px; }
  .hero { margin-top: 8px; margin-bottom: 22px; }
  .grid,#templates { grid-template-columns: 1fr; }
  .tile,#templates .tile { min-height: 94px; }
}

.tile-text { min-width:0; overflow-wrap:anywhere; }
.dialog-footer .button { text-align:center; }
@media(max-width:540px) {
  .demo-form { grid-template-columns:minmax(0,1fr); }
  .dialog-footer > .button { flex:1 1 100%; }
  .pill { min-height:39px; display:inline-flex; align-items:center; }
}
