*, *::before, *::after{box-sizing: inherit}

h1, h2, h3{
  color: var(--green-700);          
  line-height: var(--lh-tight);
	margin:0}
h3{
	color: var(--gray-700)}
h1.inline,
h2.inline,
h3.inline{margin: 0 0 var(--space-4)}
h1{font-size: var(--fs-2xl)}
h2{font-size: var(--fs-xl)}
h3{font-size: var(--fs-lg)}

p{margin: 0}
p.inline{margin: 0 0 var(--space-4)}
.small{
	color: var(--gray-600); 
	font-size: var(--fs-sm)}

/* Links: brand-forward with clear :hover/:focus */
a{
  color: var(--green-500);       
  text-decoration: none}
a:hover{color: var(--green-700)}
a:focus-visible{ 
	border-radius: 4px;
	box-shadow: var(--focus-ring); 
	outline: none}
/* Use for “learn more” info links */
a.info {color: var(--blue-500)} 

/* Code & kbd */
code,pre{
	font-family:
		ui-monospace, 
		SFMono-Regular, 
		Menlo, 
		Consolas, 
		"Liberation Mono", 
		monospace}
input, 
textarea{
	background: var(--white);
	border: 1px solid var(--gray-300); 
  border-radius: var(--radius-md); 
	box-shadow: var(--shadow-sm);
	color: var(--gray-900);
	font-size: var(--fs-md);
	outline:none; 
	padding: 10px 12px;
  width:100%}
input::placeholder{color: var(--gray-600)}
input:focus, 
textarea:focus{ 
	border-color: var(--green-500);
  box-shadow: 
    var(--shadow-sm), 
    var(--focus-ring)}
textarea{ 
  min-height: 96px; 
  resize: none}
html,
body{
  align-items: center;
	background: var(--gray-100);
	box-sizing: border-box;
	color: var(--gray-900);
  display: grid;
  grid-auto-rows: min-content;
	font-family:var(--font-sans);
	font-size: var(--fs-md);
	line-height: var(--lh-normal);
	margin:0;
	padding:0}
body.modal_on{overflow: hidden}
header{
  align-items: center;
	background: var(--white);
	border-bottom: 1px solid var(--gray-300);
	display: grid;
  height: var(--header-height);
	position: sticky;
	top: 0;
	z-index: 11}
header .container{
	align-items: center;
	display: flex;
	height: 100%;
  justify-content: space-between}
aside{
	align-items: center;
	display: flex;
	height: var(--aside-height);
	justify-content: center;      
	padding: var(--space-2) var(--space-4);
	position: fixed;
	bottom: 0;
	width: 100%;
	z-index: 10}
main{
	padding: 
    var(--space-4) 
    var(--space-4) 
    var(--aside-height)
    var(--space-4) !important}
.dialog,
.cover{
	display: none;
	inset: 0;
	overflow: auto;
	position: fixed}
.dialog.on,
.cover.on{
	display: grid}
.dialog{
	background: rgba(0, 0, 0, .2);
	gap: 10px;
	padding: var(--space-6);
  place-items:center; 
	z-index: 100}
.modal{
	background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--gray-900);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
	width: min(500px,100%)}
.modal-header{
	border-bottom: 1px solid var(--gray-300);
	padding: var(--space-4) var(--space-5)}
@media (max-width: 550px){
	.dialog{
		padding: 0;
		place-items: end center}
	.modal{
		border-radius: 
			var(--radius-lg) 
			var(--radius-lg) 0 0}
}
.cover{
	-webkit-backdrop-filter: blur(2px);
	animation: breathing-blur 4s ease-in-out infinite;
  backdrop-filter: blur(2px);
  background: rgba(255,255,255,0.08);
	z-index: 200}

@keyframes breathing-blur {
  0% {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  50% {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
  100% {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
}

#toast_cont{
  position: fixed;
  bottom: var(--aside-height);
  right: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 9999}

.toast{
  pointer-events: auto;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: var(--space-2);
  min-width: 240px;
  max-width: min(360px, 90vw);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg, 0 2px 6px rgba(0,0,0,.2));
  font-size: var(--fs-sm);
  background: var(--white);
  color: var(--gray-900);
  opacity: 0;
  transform: translateY(-6px);
  animation: toast-in .2s ease-out forwards}
.toast.dismiss {animation: toast-out .15s ease-in forwards}

@keyframes toast-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px); }
}

.toast .icon{
  width: 20px; height: 20px;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
  color: inherit;
  background: currentColor}

/* Type colors using your palette */
.toast.success { border: 1px solid var(--green-700); color: var(--green-700)}
.toast.info    { border: 1px solid var(--blue-500);  color: var(--blue-500)}
.toast.warning { border: 1px solid var(--yellow-400);color: var(--yellow-400)}
.toast.error   { border: 1px solid var(--red-500); color: var(--red-500)}
.toast.neutral { border: 1px solid var(--gray-700);  color: var(--gray-700)}

/* Confetti */
.confetti {
  position: fixed;
  top: 0;
  width: 10px;
  height: 10px;
  opacity: 0.9;
  border-radius: 2px;
  animation: fall linear forwards;
  z-index: 9999;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Balloons */
.balloon {
  position: fixed;
  bottom: -50px;
  width: 40px;
  height: 60px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: rise linear forwards;
  z-index: 10000;
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 2px;
  height: 20px;
  background: #555;
  transform: translateX(-50%);
}

@keyframes rise {
  to {
    transform: translateY(-120vh);
    opacity: 0;
  }
}
