html {
	min-height: 100%;
	background: #666 url('stripe.png') 50% 0;
}

body {
	margin: 0;
	font: 16px/20px Calibri, sans-serif;
}

header,
footer,
nav,
aside,
article,
section,
figure {
	display: block;
}

a {
	font-weight: bold;
	text-decoration: none;
}

a.external {
	padding-right: 13px;
	background: url('external_link.png') 100% 6px no-repeat;
}

img {
	border: 0;
}

table {
	border-collapse: collapse;
}

td {
	padding: 0;
}

p {
	margin: 10px 0;
}

p:first-child {
	margin-top: 0;
}

p:last-child {
	margin-bottom: 0;
}

header,
footer div,
section {
	width: 980px;
	margin: 0 auto;
}



/******************** HEADER & FOOTER ********************/
header {
	padding: 1px 0;
}

body,
footer {
	background:    -moz-linear-gradient(top, rgba(0, 0, 0, .4), rgba(0, 0, 0, .06) 10px, rgba(0, 0, 0, 0) 14px);
	background: -webkit-linear-gradient(top, rgba(0, 0, 0, .4), rgba(0, 0, 0, .06) 10px, rgba(0, 0, 0, 0) 14px);
}

header,
footer {
	padding: 20px 0;
	color: #ccc;
	text-shadow: 0 5px 10px rgba(0, 0, 0, .5);
}

header a,
footer a {
	color: #fff;
}

header a:hover,
footer a:hover {
	color: #bebed8;
}



/******************** NAVIGATION ********************/
nav {
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 0;
	text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
	border: 1px solid #333;
	border-radius: 5px;
	background: #ccc;
	background:    -moz-linear-gradient(top, #eee, #bbb);
	background: -webkit-linear-gradient(top, #eee, #bbb);
	box-shadow: 0 5px 10px rgba(0, 0, 0, .5);
	cursor: default;
}

h1,
h1 a,
nav > ul > li,
nav > ul > li > a,
#more {
	vertical-align: middle;
	float: left;
}

nav a,
#more {
	padding: 0 10px;
	line-height: 50px;
	color: #333 !important;
	border: 0 solid transparent;
	border-width: 0 1px;
}

nav a:hover {
	border-color: rgba(0, 0, 0, .15);
	background: rgba(0, 0, 255, .1);
}

nav h1 {
	margin: 0 15px 0 0;
	font-size: 24px;
	background: rgba(0, 0, 0, .1);
}

nav h1 a {
	padding: 0 20px;
	color: #000;
	border: 0;
	border-right: 1px solid rgba(0, 0, 0, .15);
	border-radius: 5px 0 0 5px;
}

nav ul {
	display: inline-block;
	margin: 0;
	padding: 0;
	list-style: none;
}

#more {
	position: relative;
	font-weight: bold;
}

#more ul {
	display: none;
	position: absolute;
	top: 36px;
	right: 0;
	width: 140px;
	padding: 5px 0;
	text-shadow: none;
	border: 1px solid #888;
	border-radius: 5px;
	background: #d1d1d1;
	box-shadow: 0 3px 6px rgba(0, 0, 0, .2);
}

#more:hover ul,
#more li,
#more a {
	display: block;
}

#more a {
	line-height: 2em;
	border-width: 1px 0;
}

#more .separate {
	margin-top: 2px;
	padding-top: 2px;
	border-top: 1px solid #999;
}



/******************** LOGIN ********************/
header form {
	display: inline-block;
	margin-right: 20px;
	line-height: 0;
	border: 1px solid #333;
	border-radius: 3px;
	background: #bbb;
	background:    -moz-linear-gradient(top, #ddd, #bbb);
	background: -webkit-linear-gradient(top, #ddd, #bbb);
	box-shadow: 0 5px 10px rgba(0, 0, 0, .5);
}

header input {
	margin: 0;
	padding: 2px 9px 3px;
	font-size: 13px;
	line-height: 20px;
	color: #333;
	border: 0;
	background: none;
}

header input::-webkit-input-placeholder {
	color: #333;
}

header input[type=text],
header input[type=password] {
	width: 90px;
	border-right: 1px solid rgba(0, 0, 0, .3);
}

header input[type=submit] {
	width: 24px;
	font-weight: bold;
	border-radius: 0 3px 3px 0;
	cursor: pointer;
}

header input[type=submit]:hover {
	background: rgba(0, 0, 255, .1);
}



/******************** FOOTER ********************/
footer {
	clear: both;
	line-height: 1.4em;
}

footer div {
	margin: 0 auto;
}

footer p {
	float: left;
	margin: 0;
	white-space: pre;
}

footer p + p {
	float: none;
	text-align: right;
	color: #888;
}



/******************** ARTICLE ********************/
article {
	margin: 0 auto;
	padding: 0 0 20px;
	border-top: 1px solid #eee;
	background: #e0e0e0 url('bg.png');
	overflow: hidden;		// This fixes spacing between article and footer on all pages, but chops off right shadow of ASIDE box
}



/******************** SECTIONS ********************/
section {
	margin: 0 auto 20px;
	padding: 20px 10px 0;
	color: #555;
	clear: both;
}

section a {
	color: #008;
}

section a:hover {
	text-decoration: underline;
}

section > hr {
	clear: left;
	height: 10px;
	margin: 0;
	border: 1px solid #aaa;
	border-radius: 5px;
	background: #e2e2e2;
	background:    -moz-linear-gradient(top, #eee, #d7d7d7);
	background: -webkit-linear-gradient(top, #eee, #d7d7d7);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

h2 {
	margin: 0;
	padding: 0;
	font-size: 20px;
	line-height: 40px;
	text-align: left;
	border: 1px solid #aaa;
	border-radius: 5px;
	background: #e2e2e2;
	background:    -moz-linear-gradient(top, #eee, #d7d7d7);
	background: -webkit-linear-gradient(top, #eee, #d7d7d7);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
	overflow: hidden;
	clear: both;
}

h2 * {
	display: inline-block;
	height: 40px;
}

h2 > b,
h2 > em {
	padding: 0 15px;
}

h2 > :first-child {
	border-left: 0;
	border-radius: 5px 0 0 5px;
}

h2 a {
	padding: 0 15px;
	color: #333 !important;
	border-left: 1px solid transparent;
	border-right: 1px solid transparent;
	background-position: 50% 50%;
	background-repeat: no-repeat;
}

h2 a:hover {
	text-decoration: none;
	border-color: rgba(0, 0, 0, .15);
	background-color: rgba(0, 0, 255, .1);
}

h2 span {
	float: right;
}

h2 span a {
	padding: 0;
}

h2 > span a:last-child {
	border-right: 0;
	border-radius: 0 5px 5px 0;
}

h2 span.link_dots {
	margin: 14px 13px 0 0;
	height: 14px;
	line-height: 0;
}

h2 span.link_dots a {
	margin: 0 1px;
	width: 12px;
	height: 12px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 3px;
	background: #d3d3d3;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

h2 span.link_dots a:hover {
	background: #bbb;
}

h2 span.link_dots a.current {
	background: #99f !important;
}

h2 a.calendar {
	width: 40px;
	background-image: url('/lil_calendar.png');
}

h2 a.edit {
	width: 46px;
	background-image: url('/lil_edit.png');
}

h2 a.random {
	width: 41px;
	background-image: url('/lil_random.png');
}

h2 a.nav_prev {
	font-size: 20px;
	padding: 0 3px 0 8px;
}

h2 a.nav_next {
	font-size: 20px;
	padding: 0 8px 0 3px;
}



/******************** SIDEBAR ********************/
#sidebar {
	float: right;
	width: 200px;
	min-height: 300px;
	margin: 20px 0 20px 20px;
	padding: 0 0 10px;
	text-align: left;
	border: 1px solid #aaa;
	border-radius: 5px;
	background: #ddd;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	overflow: hidden;
}

#sidebar h3 {
	margin: 0 0 10px;
	padding: 10px;
	border-bottom: 1px solid #aaa;
	border-radius: 5px 5px 0 0;
	background:    -moz-linear-gradient(top, #eee, #d7d7d7);
	background: -webkit-linear-gradient(top, #eee, #d7d7d7);
}

#sidebar h3 span {
	font-weight: normal;
}

#sidebar button {
	display: block;
	margin: 0 auto;
	width: 120px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

#sidebar hr {
	clear: both;
	margin: 10px auto;
	width: 120px;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, .1);
	border-bottom: 1px solid rgba(255, 255, 255, .5);
}

#sidebar p,
#sidebar ul {
	margin: 10px;
}

#sidebar ul {
	padding: 0 0 0 20px;
}



/******************** ADS ********************/
#advert {
	margin: 0 0 30px;
	float: right;
	clear: right;
}

#advert iframe {
	box-shadow: 0 2px 4px rgba(0, 0, 0, .4) !important;
}



/******************** SOLVED ********************/

#solved {
	float: left;
	display: none;
	margin: 0 10px 0 0;
	width: 40px;
	line-height: 40px;
	font-size: 34px;
	color: #090;
	text-align: center;
	text-shadow: 0 1px 0 #eee;
	border: 1px solid #aaa;
	border-radius: 5px;
	background: #e2e2e2;
	background:    -moz-linear-gradient(top, #eee, #d7d7d7);
	background: -webkit-linear-gradient(top, #eee, #d7d7d7);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	cursor: default;
}

.solved #solved {
	display: block;
}

#solved + h2 {
	clear: none;
}



/******************** BOXY LINKS ********************/

figure {
	display: inline-block;
	margin: 0;
	padding: 15px 10px;
	text-align: center;
	color: #444;
	vertical-align: top;
}

figure a:hover {
	text-decoration: none;
}

figure a:hover table,
.wordsearch figure a:hover span {
	background-color: rgba(0, 0, 255, .15);
}

figure a:hover img {
	border-color: rgba(0, 0, 255, .2);
}

figure a:hover td {
	background-color: rgba(255, 255, 255, .67);
}

.hashi figure a:hover td {
	background-color: inherit;
}

figure dd {
	position: absolute;
	margin: 7px 0 0 -7px;
	padding: 0;
	color: lime;
	font-size: 36pt;
	text-shadow: 0 2px 4px #000;
}

figure img,
figure span {
	display: block;
}

figure img,
figure span,
figure table {
	margin: 4px auto;
	color: #666;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
	border-radius: 5px;
}

.sudoku figure table {
	font-size: 12px;
	font-weight: bold;
	line-height: 12px;
	border: 5px solid transparent;
	border-spacing: 1px;
	border-collapse: separate;
	background: #ccc;
}

.sudoku figure td {
	width: 20px;
	height: 20px;
	background: #eee;
}

.sudoku figure td:nth-child(3),
.sudoku figure td:nth-child(6) {
	border-right: 1px solid #ccc;
}

.sudoku figure tr:nth-child(3) td,
.sudoku figure tr:nth-child(6) td {
	border-bottom: 1px solid #ccc;
}

.jigsaw figure {
	max-width: 230px;
	width: 210px;
}

.jigsaw figure i {
	display: block;
}

.jigsaw figure img {
	max-height: 200px;
	border: 5px solid #fff;
}

.jigsaw figure hr {
	margin: 10px 0 0;
}

.kakuro figure table {
	border: 5px solid transparent;
	background: #ccc;
}

.kakuro figure td {
	width: 20px;
	height: 20px;
	background: #eee;
	border: 1px solid #bbb;
}

.wordsearch figure {
	width: 220px;
}

.wordsearch figure span {
	padding: 8px 10px;
	font-size: 14px;
	font-style: italic;
	text-align: left;
	line-height: 17px;
	background: #eee;
}

.nonogram figure table {
	border: 5px solid transparent;
	border-spacing: 1px;
	border-collapse: separate;
	border-radius: 5px;
	background: #ccc;
}

.nonogram figure th,
.nonogram figure td {
	padding: 0;
	line-height: 9px;
	font-size: 9px;
	font-weight: normal;
}

.nonogram figure td {
	width: 10px;
	height: 10px;
	background: #eee;
}

.nonogram figure tr:first-child th {
	vertical-align: bottom;
	padding-bottom: 3px;
}

.nonogram figure tr th:first-child {
	text-align: right;
	padding-right: 4px;
}

.hashi figure table {
	border: 5px solid transparent;
	border-radius: 5px;
	background: #eee;
}

.hashi figure td {
	width: 15px;
	height: 15px;
	background: url('/hashi_grid.png') no-repeat
}

.hashi figure td div {
	width: 13px;
	height: 13px;
	font-size: 11px;
	line-height: 11px;
	border: 1px solid #333;
	border-radius: 10px;
	background: #fff;
}

.hitori figure table {
	border: 5px solid transparent;
	border-spacing: 1px;
	border-collapse: separate;
}

.hitori figure td {
	width: 18px;
	height: 18px;
	line-height: 12px;
	font-size: 12px;
	background: #eee;
}

.mathdoku figure table {
	background: #ccc;
}

.mathdoku figure td {
	padding: 1px 3px 0 3px;
	width: 25px;
	height: 30px;
	font-size: 12px;
	font-weight: bold;
	line-height: 1;
	text-align: left;
	vertical-align: top;
	background: #eee;
	border: 0 solid #bbb;
}

.mathdoku figure td.t {
	border-top-width: 1px;
}

.mathdoku figure td.l {
	border-left-width: 1px;
}

.mathdoku figure th {
	width: 5px;
	height: 5px;
	padding: 0;
}

.polyomino figure table {
	background: #ccc;
}

.polyomino figure th {
	width: 5px;
	height: 5px;
	padding: 0;
}

.polyomino figure tr:first-child th,
.polyomino figure tr:last-child th {
	border: 0;
}

.polyomino figure th:first-child                 {border-right:  1px solid #888}
.polyomino figure th:last-child                  {border-left:   1px solid #888}
.polyomino figure tr:first-child th:nth-child(2) {border-bottom: 1px solid #888}
.polyomino figure tr:last-child th:nth-child(2)  {border-top:    1px solid #888}

.polyomino figure td {
	width: 15px;
	height: 15px;
	line-height: 15px;
	font-size: 11px;
	border-top: 1px dotted #ccc;
	border-left: 1px dotted #ccc;
	background: #eee;
}

.polyomino figure td.t {
	border-top: 1px solid #888;
}

.polyomino figure td.l {
	border-left: 1px solid #888;
}

.polyomino figure td.filled {
	background: #ddd;
	background: rgba(255, 255, 255, .33);
}

.illumination figure table {
	background: #ccc;
}

.illumination figure th {
	width: 5px;
	height: 5px;
	padding: 0;
}

.illumination figure td {
	width: 15px;
	height: 15px;
	padding: 0;
	font-size: 11px;
	line-height: 15px;
	border: 1px solid #ccc;
	background: #eee;
}

.illumination figure td.block {
	font-weight: bold;
	color: #ccc;
	border: 0;
	background: rgba(0, 0, 0, .5);
}



/******************** PUZZLES ********************/
#puzzle {
	margin: 20px auto 0;
	cursor: default;
	-moz-user-select:    none;
	-webkit-user-select: none;
	user-select:         none;
	background: #eee;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
	outline: 0;
}

.sudoku #puzzle,
.hitori #puzzle {
	border: 10px solid transparent;
	border-spacing: 1px;
	border-collapse: separate;
}

.sudoku #puzzle,
.kakuro #puzzle,
.hitori #puzzle {
	border-radius: 10px;
	background: #ccc;
}

.sudoku #puzzle td,
.kakuro #puzzle td,
.kakuro #puzzle th {
	padding: 1px;
	width: 51px;
	height: 53px;
	line-height: 1;
	text-align: center;
	overflow: hidden;
	background: #eee;
}

.kakuro #puzzle td {
	border: 1px solid #bbb;
}

.kakuro #puzzle th {
	background: bottom right no-repeat;
}

.kakuro #puzzle tr:first-child th {height: 26px}
.kakuro #puzzle tr:last-child th  {height: 15px}
.kakuro #puzzle th:first-child    {width:  26px}
.kakuro #puzzle th:last-child     {width:  15px}

.sudoku #puzzle tr:nth-child(3) td,
.sudoku #puzzle tr:nth-child(6) td {
	border-bottom: 2px solid #ccc;
}

.sudoku #puzzle td:nth-child(3),
.sudoku #puzzle td:nth-child(6) {
	border-right: 2px solid #ccc;
}

.sudoku #puzzle td span,
.kakuro #puzzle td span,
.mathdoku #puzzle td span,
.mathdoku #puzzle td i {
	display: inline-block;
	width: 17px;
	height: 17px;
	line-height: 17px;
	font-size: 14px;
	font-style: normal;
	color: transparent;
}

.sudoku #puzzle td span:hover,
.kakuro #puzzle td span:hover,
.mathdoku #puzzle td span:hover {
	background: rgba(0, 0, 0, .08);
	cursor: pointer;
}

.sudoku #puzzle td .on,
.kakuro #puzzle td .on,
.mathdoku #puzzle td .on {
	color: #666;
	font-weight: normal;
}

.sudoku #puzzle td:hover span:not(.on),
.kakuro #puzzle td:hover span:not(.on),
.mathdoku #puzzle td:hover span:not(.on) {
	color: #888;
}

.mathdoku #puzzle td:hover i {
	color: #ddd;
}

.sudoku #puzzle td:hover .on,
.kakuro #puzzle td:hover .on,
.mathdoku #puzzle td:hover .on {
	color: #000;
	font-weight: bold;
}

.kakuro #puzzle th b {
	display: block;
	padding: 0 3px;
	line-height: 20px;
}

.kakuro #puzzle .right {
	text-align: right;
}

.kakuro #puzzle .bottom {
	vertical-align: bottom;
}

.kakuro #puzzle .split {
	background-image: url("diag.png");
	vertical-align: bottom;
}

.kakuro #puzzle .split b:first-child {
	text-align: right;
}

.kakuro #puzzle .split b:last-child {
	padding: 4px 10px 0 0;
}

.wordplay {
	text-align: center;
}

.wordplay #sidebar {
	width: 550px;
}

.wordplay #sidebar {
	min-height: 363px;
}

.wordplay #wordlist {
	text-transform: lowercase;
	-moz-column-count: 4;
	column-count: 4;
}

.wordplay #puzzle {
	display: inline-block;
	padding: 10px;
	border-radius: 10px;
}

.wordplay #puzzle td {
	width: 90px;
	height: 90px;
	padding: 0;
	font-size: 60px;
	font-family: Consolas, 'Trebuchet MS';
	text-align: center;
	line-height: 1;
}

.wordplay #el_svg {
	position: absolute;
}

.wordplay #word_assembly {
	font-size: 40px;
	line-height: 40px;
	height: 40px;
	text-transform: lowercase;
}

.accepted {
	font-size: 20pt !important;
	font-weight: bold;
}

.wrong {
	background: yellow !important;
}



/******************** CALENDAR ********************/
.month {
	text-align: center;
}

.month h3 {
	margin: 5px 0;
	padding: 0;
	font-size: 16px;
	line-height: 2em;
	border-bottom: 1px solid #aaa;
}

.month br {
	clear: left;
}

.month > div {
	clear: left;
	overflow: auto;
}

.month > div > div {
	float: left;
	padding: 5px 10px 10px;
	overflow: hidden;
}

.month a.d,
.month a.h,
.month a.s {
	display: block;
	float: left;
	margin: 2px;
	width: 26px;
	height: 26px;
	font-size: 13px;
	font-weight: normal;
	line-height: 26px;
	color: rgba(0, 0, 0, .6);
	border: 1px solid #aaa;
	border-radius: 5px;
	background: #ddd;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.month a.h {
	visibility: hidden;
}

.month a.s {
	background: #8f8;
}

.month a:hover {
	text-decoration: none;
	background: #ccc;
}

.month a.s:hover {
	background: #6d6;
}
